repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Controllers/ValiantProfileController.php
src/Traits/Controllers/ValiantProfileController.php
<?php namespace Kdion4891\Valiant\Traits\Controllers; use Illuminate\Http\Request; trait ValiantProfileController { use ValiantController; public function getEdit() { return view('valiant::auth.profile', ['model' => $this->model]); } public function postEdit(Request $request) { $this->validate($request, $this->model->fieldRules('profile_edit')); $this->model->update($this->requestData('profile_edit')); return back()->with('status', 'Profile edited!'); } public function getPassword() { return view('valiant::auth.passwords.change', ['model' => $this->model]); } public function postPassword(Request $request) { $this->validate($request, $this->model->fieldRules('profile_password')); $this->model->update($this->requestData('profile_password')); return back()->with('status', 'Password changed!'); } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Models/ColumnFillable.php
src/Traits/Models/ColumnFillable.php
<?php namespace Kdion4891\Valiant\Traits\Models; use Illuminate\Support\Facades\Schema; trait ColumnFillable { public function getFillable() { return Schema::getColumnListing($this->getTable()); } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Models/ValiantModel.php
src/Traits/Models/ValiantModel.php
<?php namespace Kdion4891\Valiant\Traits\Models; use Kdion4891\Valiant\Action; trait ValiantModel { use ColumnFillable, UserTimezone; public function getViewTitleAttribute($value) { return property_exists($this, 'view_title') ? $this->view_title : trim(preg_replace('/[A-Z]([A-Z](?![a-z]))*/', ' $0', class_basename($this))); } public function getLogActionsAttribute($value) { return property_exists($this, 'log_actions') ? $this->log_actions : true; } public function fields() { return []; } public function indexActions() { return [ Action::createButton(), ]; } public function detailActions() { return []; } public function singleActions() { return [ Action::detailsButton(), Action::editButton(), Action::deleteButton(), ]; } public function bulkActions() { return [ Action::deleteBulk(), ]; } public function table($query = null, $show_actions = true, $show_checkbox = true) { $fields = $this->fields(); $single_actions = $this->singleActions(); $bulk_actions = $this->bulkActions(); $table = datatables($query ? $query : $this->tableQuery()); foreach ($fields as $field) { if ($field->table) { if ($field->table_view_custom || $field->table_view) { $table->editColumn($field->name, function ($model) use ($field) { $data = array_merge($field->table_view_custom_data, ['model' => $model, 'field' => $field]); return view($field->table_view_custom ? $field->table_view_custom : $field->table_view, $data); }); } } } if ($show_actions && $single_actions) { $table->editColumn('table_actions', function ($model) { return view('valiant::models.actions.single', ['model' => $model]); }); } if ($show_checkbox && $bulk_actions) { $table->editColumn('table_checkbox', function ($model) { return view('valiant::models.actions.checkbox', ['model' => $model]); }); } $columns = []; $default_order = null; $default_order_index = 0; foreach ($fields as $field) { if ($field->table) { $column = []; $column['title'] = $field->label; $column['data'] = $field->table_alias ? $field->table_alias : $field->name; if (!$field->table_search) $column['searchable'] = false; if (!$field->table_sort) $column['orderable'] = false; if ($field->table_default_order) $default_order = [$default_order_index, $field->table_default_order]; if ($field->table_hidden) $column['className'] = 'd-none'; $columns[] = $column; $default_order_index++; } } $html = app('datatables.html')->columns($columns); $html->setTableId('table' . preg_replace('/^[^a-z]+|[^\w:.-]+/i', '_', parse_url(request()->url())['path'])); if ($default_order) $html->orderBy($default_order); if ($show_actions && $single_actions) $html->addAction(['title' => '', 'data' => 'table_actions']); if ($show_checkbox && $bulk_actions) $html->addCheckbox(['title' => view('valiant::models.actions.checkbox-all')->render(), 'data' => 'table_checkbox']); return (object)[ 'json' => $table->toJson(), 'html' => $html, ]; } public function tableQuery() { return $this->select($this->getTable() . '.*')->with($this->with)->withCount($this->withCount); } public function fieldInputs($action) { $field_inputs = []; foreach ($this->fields() as $field) if (in_array($action, $field->input_actions)) $field_inputs[$field->name] = $field; return $field_inputs; } public function fieldRules($action) { $field_rules = []; foreach ($this->fields() as $field) if (isset($field->rules_actions[$action])) $field_rules = array_merge($field->rules_actions[$action], $field_rules); return $field_rules; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Models/UserTimezone.php
src/Traits/Models/UserTimezone.php
<?php namespace Kdion4891\Valiant\Traits\Models; use Carbon\Carbon; use Illuminate\Support\Facades\Auth; trait UserTimezone { public function getCreatedAtAttribute($value) { return $this->userTimezone($value); } public function getUpdatedAtAttribute($value) { return $this->userTimezone($value); } public function getDeletedAtAttribute($value) { return $this->userTimezone($value); } public function getEmailVerifiedAtAttribute($value) { return $this->userTimezone($value); } private function userTimezone($value) { return ($value && Auth::check()) ? Carbon::parse($value)->tz(Auth::user()->timezone)->toDateTimeString() : $value; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Models/ValiantLogModel.php
src/Traits/Models/ValiantLogModel.php
<?php namespace Kdion4891\Valiant\Traits\Models; use Illuminate\Support\Facades\Auth; use Kdion4891\Valiant\Action; use Kdion4891\Valiant\Field; trait ValiantLogModel { use ValiantModel; public function user() { return $this->belongsTo('App\User')->withDefault(['name' => null]); } public function fields() { return [ Field::make('ID')->detail(), Field::make('User', 'user_id') ->table('user.name')->tableSearchSort() ->detail('user.name'), Field::make('Action') ->table()->tableSearchSort() ->detail(), Field::make('Data')->detail(), Field::make('Created At') ->table()->tableSearchSort()->tableDefaultOrder('desc') ->detail(), ]; } public function indexActions() { return []; } public function singleActions() { return [ Action::detailsButton(), Action::deleteButton(), ]; } public static function action($action) { $log = new static(); $log->user_id = Auth::check() ? Auth::user()->id : null; $log->action = $action; return $log; } public function withData($data = []) { $this->data = $data ? $data : null; return $this; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Traits/Models/ValiantUserModel.php
src/Traits/Models/ValiantUserModel.php
<?php namespace Kdion4891\Valiant\Traits\Models; use Illuminate\Support\Facades\Hash; use Illuminate\Validation\Rule; use Kdion4891\Valiant\Action; use Kdion4891\Valiant\Field; use Kdion4891\Valiant\Rules\CurrentPassword; trait ValiantUserModel { use ValiantModel; public function getRolesAttribute($value) { return property_exists($this, 'roles') ? $this->roles : ['Admin', 'User']; } public function getRegisterRoleAttribute($value) { return property_exists($this, 'register_role') ? $this->register_role : 'User'; } public function setPasswordAttribute($value) { $this->attributes['password'] = strlen($value) == 60 && substr($value, 0, 4) == '$2y$' ? $value : Hash::make($value); } public function logs() { return $this->hasMany('App\Log'); } public function fields() { return [ Field::make('ID')->detail(), Field::make('Name') ->table()->tableSearchSort()->tableDefaultOrder() ->detail() ->input()->inputActions(['create', 'edit', 'profile_edit']) ->rulesActions(['create', 'edit', 'profile_edit'], ['name' => 'required']), Field::make('Email') ->table()->tableSearchSort() ->detail() ->input('email')->inputActions(['create', 'edit', 'profile_edit']) ->rulesActions(['create', 'edit', 'profile_edit'], ['email' => ['required', 'email', Rule::unique('users')->ignore($this->id)]]), Field::make('Current Password') ->input('password')->inputActions(['profile_password']) ->rulesActions(['profile_password'], ['current_password' => ['required', new CurrentPassword]]), Field::make('Password') ->input('password')->inputActions(['create', 'password', 'profile_password']) ->rulesActions(['create', 'password', 'profile_password'], ['password' => 'required|confirmed']), Field::make('Confirm Password', 'password_confirmation') ->input('password')->inputActions(['create', 'password', 'profile_password']), Field::make('Role') ->table()->tableSearchSort() ->detail() ->inputSelect($this->roles)->inputActions(['create', 'edit']) ->rulesActions(['create', 'edit'], ['role' => ['required', Rule::in($this->roles)]]), Field::make('Timezone') ->table()->tableSearchSort() ->detail(), Field::make('Email Verified At')->detail(), Field::make('Created At')->detail(), Field::make('Updated At')->detail(), ]; } public function singleActions() { return [ Action::detailsButton(), Action::editButton(), Action::make('valiant::users.actions.password-button'), Action::deleteButton(), ]; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Rules/CurrentPassword.php
src/Rules/CurrentPassword.php
<?php namespace Kdion4891\Valiant\Rules; use Illuminate\Contracts\Validation\Rule; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; class CurrentPassword implements Rule { public function passes($attribute, $value) { return Hash::check($value, Auth::user()->password); } public function message() { return 'The :attribute is invalid.'; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Console/Commands/ValiantMakeCommand.php
src/Console/Commands/ValiantMakeCommand.php
<?php namespace Kdion4891\Valiant\Console\Commands; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Str; class ValiantMakeCommand extends Command { protected $signature = 'valiant:make {model}'; protected $description = 'Generate new Valiant model scaffolding.'; private $files; private $replaces; private $stubs_path = __DIR__ . '/../../../resources/stubs'; public function __construct(Filesystem $files) { parent::__construct(); $this->files = $files; } public function handle() { $model_title = trim(preg_replace('/[A-Z]([A-Z](?![a-z]))*/', ' $0', $this->argument('model'))); $model_titles = Str::plural($model_title); $this->replaces = [ 'DummyControllerClass' => $this->argument('model') . 'Controller', 'DummyModelClass' => $this->argument('model'), 'DummyMigrationClass' => 'Create' . str_replace(' ', '', $model_titles) . 'Table', 'DummyModelTitles' => $model_titles, 'DummyTable' => Str::snake($model_titles), ]; $this->createController(); $this->createModel(); $this->createMigration(); $this->insertNavItem(); $this->insertRoute(); } private function createController() { $file = 'Http/Controllers/' . $this->replaces['DummyControllerClass'] . '.php'; $info = 'app/' . $file; $path = app_path($file); if ($this->files->exists(($path))) { $this->warn('Controller file exists: <info>' . $info . '</info>'); return; } $content = $this->files->get($this->stubs_path . '/controllers/ModelController.stub'); $this->files->put($path, $this->replace($content)); $this->line('Controller file created: <info>' . $info . '</info>'); } private function createModel() { $file = $this->replaces['DummyModelClass'] . '.php'; $info = 'app/' . $file; $path = app_path($file); if ($this->files->exists(($path))) { $this->warn('Model file exists: <info>' . $info . '</info>'); return; } $content = $this->files->get($this->stubs_path . '/models/Model.stub'); $this->files->put($path, $this->replace($content)); $this->line('Model file created: <info>' . $info . '</info>'); } private function createMigration() { $suffix = '_create_' . $this->replaces['DummyTable'] . '_table.php'; if ($existing = glob(database_path('migrations/*' . $suffix))) { $info = 'database' . str_replace(database_path(), '', $existing[0]); $this->warn('Migration file exists: <info>' . $info . '</info>'); return; } $file = date('Y_m_d_His') . $suffix; $info = 'database/migrations/' . $file; $path = database_path('migrations/' . $file); $content = $this->files->get($this->stubs_path . '/migration.stub'); $this->files->put($path, $this->replace($content)); $this->line('Migration file created: <info>' . $info . '</info>'); } private function insertNavItem() { $file = 'views/vendor/valiant/layouts/navs/sidebar.blade.php'; $info = 'resources/' . $file; $path = resource_path($file); if (!$this->files->exists($path)) { $this->error('Sidebar file missing: <info>' . $info . '</info>'); return; } $file_content = $this->files->get($path); $stub_content = $this->replace($this->files->get($this->stubs_path . '/nav-item.stub')); if (strpos($file_content, $stub_content) !== false) { $this->warn('Nav item exists in: <info>' . $info . '</info>'); return; } $this->files->prepend($path, $stub_content); $this->line('Nav item inserted in: <info>' . $info . '</info>'); } private function insertRoute() { $file = 'routes/web.php'; $path = base_path($file); $file_content = $this->files->get($path); $stub_content = $this->replace($this->files->get($this->stubs_path . '/routes/route.stub')); if (strpos($file_content, $stub_content) !== false) { $this->warn('Route exists in: <info>' . $file . '</info>'); return; } $this->files->append($path, $stub_content); $this->line('Route inserted in: <info>' . $file . '</info>'); } public function replace($content) { foreach ($this->replaces as $search => $replace) { $content = str_replace($search, $replace, $content); } return $content; } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/src/Providers/ValiantServiceProvider.php
src/Providers/ValiantServiceProvider.php
<?php namespace Kdion4891\Valiant\Providers; use Illuminate\Support\Facades\Gate; use Illuminate\Support\ServiceProvider; use Kdion4891\Valiant\Console\Commands\ValiantMakeCommand; class ValiantServiceProvider extends ServiceProvider { public function boot() { $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/ConfirmPasswordController.stub' => app_path('Http/Controllers/Auth/ConfirmPasswordController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/ForgotPasswordController.stub' => app_path('Http/Controllers/Auth/ForgotPasswordController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/LoginController.stub' => app_path('Http/Controllers/Auth/LoginController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/ProfileController.stub' => app_path('Http/Controllers/Auth/ProfileController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/RegisterController.stub' => app_path('Http/Controllers/Auth/RegisterController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/ResetPasswordController.stub' => app_path('Http/Controllers/Auth/ResetPasswordController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/auth/VerificationController.stub' => app_path('Http/Controllers/Auth/VerificationController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/HomeController.stub' => app_path('Http/Controllers/HomeController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/LogController.stub' => app_path('Http/Controllers/LogController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/controllers/UserController.stub' => app_path('Http/Controllers/UserController.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/models/Log.stub' => app_path('Log.php')], 'install'); $this->publishes([__DIR__ . '/../../resources/stubs/models/User.stub' => app_path('User.php')], 'install'); $this->publishes([__DIR__ . '/../../public' => public_path('valiant')], ['install', 'public']); $this->publishes([__DIR__ . '/../../resources/views/layouts/navs/sidebar.blade.php' => resource_path('views/vendor/valiant/layouts/navs/sidebar.blade.php')], ['install']); $this->publishes([__DIR__ . '/../../resources/views' => resource_path('views/vendor/valiant')], ['views']); $this->publishes([__DIR__ . '/../../resources/stubs/routes/routes.stub' => base_path('routes/web.php')], 'install'); $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'valiant'); $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); if ($this->app->runningInConsole()) { $this->commands(ValiantMakeCommand::class); } Gate::before(function ($user, $role) { if ($user->role == $role) return true; }); } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/database/migrations/2019_12_23_032923_create_logs_table.php
database/migrations/2019_12_23_032923_create_logs_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateLogsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('logs', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('user_id')->nullable()->index(); $table->string('action')->index(); $table->text('data')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('logs'); } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/database/migrations/2019_12_23_014335_create_users_columns.php
database/migrations/2019_12_23_014335_create_users_columns.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateUsersColumns extends Migration { public function up() { Schema::table('users', function (Blueprint $table) { $table->string('role')->index(); $table->string('timezone')->default(config('app.timezone'))->index(); }); } public function down() { Schema::table('users', function (Blueprint $table) { $table->dropColumn('role'); $table->dropColumn('timezone'); }); } }
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/home.blade.php
resources/views/home.blade.php
@extends('valiant::layouts.auth') @section('title', 'Dashboard') @section('child-header') <h1 class="mb-2 text-dark">@yield('title')</h1> @endsection @section('child-content') <div class="card"> <div class="card-body"> <p class="card-text"> You are logged in! </p> </div> </div> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/login.blade.php
resources/views/auth/login.blade.php
@extends('valiant::layouts.guest') @section('title', 'Login') @section('child-content') <form method="POST" action="{{ route('login') }}"> @csrf <input type="hidden" name="timezone" value="{{ config('app.timezone') }}" data-user-timezone> <div class="input-group mb-3"> <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="Email" value="{{ old('email') }}"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-envelope"></span></div></div> @error('email')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> @error('password')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="form-check mb-3"> <input type="checkbox" name="remember" id="remember" class="form-check-input" {{ old('remember') ? 'checked' : '' }}> <label for="remember" class="form-check-label">Remember Me</label> </div> <button type="submit" class="btn btn-block btn-primary">Login</button> @if (Route::has('password.request')) <p class="text-center mt-3 mb-0"> <a href="{{ route('password.request') }}">Forgot Your Password?</a> </p> @endif </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/profile.blade.php
resources/views/auth/profile.blade.php
@extends('valiant::layouts.auth') @section('title', 'Edit Profile') @section('child-header') <h1 class="mb-2 text-dark">@yield('title')</h1> @endsection @section('child-content') <form method="POST" action="{{ url('profile/edit') }}" enctype="multipart/form-data"> @csrf <div class="card"> <div class="list-group list-group-flush"> @include('valiant::inputs.list', ['action' => 'profile_edit']) </div> <div class="card-footer text-center bg-light rounded-bottom"> <button type="submit" class="btn btn-primary">Save Profile</button> </div> </div> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/verify.blade.php
resources/views/auth/verify.blade.php
@extends('valiant::layouts.guest') @section('title', 'Verify Your Email Address') @section('child-content') <p class="login-box-msg"> @if (session('resent')) <span class="text-success">A fresh verification link has been sent to your email address.</span> @else Before proceeding, please check your email for a verification link. @endif </p> <form method="POST" action="{{ route('verification.resend') }}"> @csrf <button type="submit" class="btn btn-block btn-primary">Resend Verification Link</button> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/register.blade.php
resources/views/auth/register.blade.php
@extends('valiant::layouts.guest') @section('title', 'Register') @section('child-content') <form method="POST" action="{{ route('register') }}"> @csrf <input type="hidden" name="timezone" value="{{ config('app.timezone') }}" data-user-timezone> <div class="input-group mb-3"> <input type="text" name="name" class="form-control @error('name') is-invalid @enderror" placeholder="Name" value="{{ old('name') }}"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-user"></span></div></div> @error('name')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="Email" value="{{ old('email') }}"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-envelope"></span></div></div> @error('email')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> @error('password')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="password" name="password_confirmation" class="form-control" placeholder="Confirm Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> </div> <button type="submit" class="btn btn-block btn-primary">Register</button> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/passwords/email.blade.php
resources/views/auth/passwords/email.blade.php
@extends('valiant::layouts.guest') @section('title', 'Reset Password') @section('child-content') <form method="POST" action="{{ route('password.email') }}"> @csrf <div class="input-group mb-3"> <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="Email" value="{{ old('email') }}"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-envelope"></span></div></div> @error('email')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <button type="submit" class="btn btn-block btn-primary">Send Password Reset Link</button> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/passwords/reset.blade.php
resources/views/auth/passwords/reset.blade.php
@extends('valiant::layouts.guest') @section('title', 'Reset Password') @section('child-content') <form method="POST" action="{{ route('password.update') }}"> @csrf <input type="hidden" name="token" value="{{ $token }}"> <div class="input-group mb-3"> <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="Email" value="{{ $email ?? old('email') }}"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-envelope"></span></div></div> @error('email')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> @error('password')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <div class="input-group mb-3"> <input type="password" name="password_confirmation" class="form-control" placeholder="Confirm Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> </div> <button type="submit" class="btn btn-block btn-primary">Reset Password</button> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/passwords/change.blade.php
resources/views/auth/passwords/change.blade.php
@extends('valiant::layouts.auth') @section('title', 'Change Password') @section('child-header') <h1 class="mb-2 text-dark">@yield('title')</h1> @endsection @section('child-content') <form method="POST" action="{{ url('profile/password') }}" enctype="multipart/form-data"> @csrf <div class="card"> <div class="list-group list-group-flush"> @include('valiant::inputs.list', ['action' => 'profile_password']) </div> <div class="card-footer text-center bg-light rounded-bottom"> <button type="submit" class="btn btn-primary">Save Password</button> </div> </div> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/auth/passwords/confirm.blade.php
resources/views/auth/passwords/confirm.blade.php
@extends('valiant::layouts.guest') @section('title', 'Confirm Password') @section('child-content') <p class="login-box-msg"> Please confirm your password before continuing. </p> <form method="POST" action="{{ route('password.confirm') }}"> @csrf <div class="input-group mb-3"> <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Password"> <div class="input-group-append"><div class="input-group-text rounded-right"><span class="fa fa-fw fa-lock"></span></div></div> @error('password')<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>@enderror </div> <button type="submit" class="btn btn-block btn-primary">Confirm Password</button> @if (Route::has('password.request')) <p class="text-center mt-3 mb-0"> <a href="{{ route('password.request') }}">Forgot Your Password?</a> </p> @endif </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/edit.blade.php
resources/views/models/edit.blade.php
@extends('valiant::layouts.auth') @section('title', 'Edit ' . $model->view_title) @section('child-header') <div class="row"> <div class="col-sm"> <h1 class="mb-2 text-dark">@yield('title')</h1> </div> <div class="col-sm-auto"> @include('valiant::models.actions.single') </div> </div> @endsection @section('child-content') <form method="POST" action="{{ url($model->getTable() . '/edit/' . $model->id) }}" enctype="multipart/form-data"> @csrf <div class="card"> <div class="list-group list-group-flush"> @include('valiant::inputs.list', ['action' => 'edit']) </div> <div class="card-footer text-center bg-light rounded-bottom"> <button type="submit" name="_submit" value="save" class="btn btn-primary">Save</button> <button type="submit" name="_submit" value="back" class="btn btn-primary">Save &amp; Go Back</button> </div> </div> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/details.blade.php
resources/views/models/details.blade.php
@extends('valiant::layouts.auth') @section('title', $model->view_title . ' Details') @section('child-header') <div class="row"> <div class="col-sm"> <h1 class="mb-2 text-dark">@yield('title')</h1> </div> <div class="col-sm-auto"> @include('valiant::models.actions.single') </div> </div> @endsection @section('child-content') @include('valiant::details.list') @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/index.blade.php
resources/views/models/index.blade.php
@extends('valiant::layouts.auth') @section('title', Str::plural($model->view_title)) @section('child-header') <div class="row"> <div class="col-sm"> <h1 class="mb-2 text-dark">@yield('title')</h1> </div> <div class="col-sm-auto"> @include('valiant::models.actions.index') @include('valiant::models.actions.bulk') </div> </div> @endsection @section('child-content') <div class="card"> <div class="card-body"> {!! $html->table() !!} </div> </div> @endsection @push('scripts') {!! $html->scripts() !!} @endpush
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/create.blade.php
resources/views/models/create.blade.php
@extends('valiant::layouts.auth') @section('title', 'Create ' . $model->view_title) @section('child-header') <h1 class="mb-2 text-dark">@yield('title')</h1> @endsection @section('child-content') <form method="POST" action="{{ url($model->getTable() . '/create') }}" enctype="multipart/form-data"> @csrf <div class="card"> <div class="list-group list-group-flush"> @include('valiant::inputs.list', ['action' => 'create']) </div> <div class="card-footer text-center bg-light rounded-bottom"> <button type="submit" name="_submit" value="save" class="btn btn-primary">Save</button> <button type="submit" name="_submit" value="back" class="btn btn-primary">Save &amp; Go Back</button> </div> </div> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/single.blade.php
resources/views/models/actions/single.blade.php
@if($actions = $model->singleActions()) <div class="text-right text-nowrap"> @foreach($actions as $action) @include($action->view) @endforeach </div> @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/delete-bulk.blade.php
resources/views/models/actions/delete-bulk.blade.php
<form method="POST" action="{{ url($model->getTable() . '/delete-bulk') }}" data-ajax-form> @csrf <input type="hidden" name="ids" data-checkbox-ids> <button type="submit" class="dropdown-item" data-confirm="Are you sure?"> Delete </button> </form>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/detail.blade.php
resources/views/models/actions/detail.blade.php
@if($actions = $model->detailActions()) <div class="card-header p-0 border-bottom-0"> <ul class="nav nav-tabs" role="tablist"> @foreach($actions as $action) @include($action->view) @endforeach </ul> </div> @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/checkbox.blade.php
resources/views/models/actions/checkbox.blade.php
<input type="checkbox" value="{{ $model->id }}" data-checkbox-id>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/delete-button.blade.php
resources/views/models/actions/delete-button.blade.php
<form method="POST" action="{{ url($model->getTable() . '/delete/' . $model->id) }}" class="d-inline" data-ajax-form> @csrf <input type="hidden" name="request_ajax" value="{{ Request::ajax() }}"> <button type="submit" class="btn {{ Request::ajax() ? 'btn-sm' : '' }} btn-outline-danger px-btn" title="Delete" data-confirm="Are you sure?"> <i class="fa fa-fw fa-trash"></i> </button> </form>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/bulk.blade.php
resources/views/models/actions/bulk.blade.php
@if($actions = $model->bulkActions()) <div class="dropdown d-inline-block"> <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> <i class="fa fa-check-square"></i> </button> <div class="dropdown-menu dropdown-menu-right"> @foreach($actions as $action) @include($action->view) @endforeach </div> </div> @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/index.blade.php
resources/views/models/actions/index.blade.php
@if($actions = $model->indexActions()) @foreach($actions as $action) @include($action->view) @endforeach @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/details-tab.blade.php
resources/views/models/actions/details-tab.blade.php
<li class="nav-item"> <a class="nav-link {{ Request::is($model->getTable() . '/details/' . $model->id) ? 'active' : '' }}" href="{{ url($model->getTable() . '/details/' . $model->id) }}" role="tab" > Details </a> </li>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/create-button.blade.php
resources/views/models/actions/create-button.blade.php
<a href="{{ url($model->getTable() . '/create') }}" class="btn btn-primary"> Create {{ $model->view_title }} </a>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/details-button.blade.php
resources/views/models/actions/details-button.blade.php
<a href="{{ url($model->getTable() . '/details/' . $model->id) }}" class="btn {{ Request::ajax() ? 'btn-sm' : '' }} btn{{ !Request::is($model->getTable() . '/details*' . $model->id) ? '-outline' : '' }}-primary px-btn" title="Details" > <i class="fa fa-fw fa-eye"></i> </a>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/checkbox-all.blade.php
resources/views/models/actions/checkbox-all.blade.php
<input type="checkbox" data-checkbox-ids-all>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/models/actions/edit-button.blade.php
resources/views/models/actions/edit-button.blade.php
<a href="{{ url($model->getTable() . '/edit/' . $model->id) }}" class="btn {{ Request::ajax() ? 'btn-sm' : '' }} btn{{ !Request::is($model->getTable() . '/edit/' . $model->id) ? '-outline' : '' }}-primary px-btn" title="Edit" > <i class="fa fa-fw fa-edit"></i> </a>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/details/checkbox.blade.php
resources/views/details/checkbox.blade.php
<i class="fa fa-fw {{ $model->{$field->name} ? 'fa-check text-success' : 'fa-times text-danger' }}"></i>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/details/checkboxes.blade.php
resources/views/details/checkboxes.blade.php
@foreach($field->input_options as $value => $label) <div class="text-nowrap"> <i class="fa fa-fw {{ is_array($model->{$field->name}) && in_array($value, $model->{$field->name}) ? 'fa-check text-success' : 'fa-times text-danger' }}"></i> {{ $label }} </div> @endforeach
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/details/files.blade.php
resources/views/details/files.blade.php
@if($model->{$field->name}) @foreach($model->{$field->name} as $key => $file) <div class="text-nowrap"> <a href="{{ asset($file['file']) }}" target="_blank"> <i class="fa {{ file_icon($file['mime_type']) }} mr-1"></i> {{ $file['name'] }} </a> </div> @endforeach @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/details/list.blade.php
resources/views/details/list.blade.php
<div class="card card-primary card-outline card-outline-tabs"> @include('valiant::models.actions.detail') <div class="list-group list-group-flush"> @foreach($model->fields() as $field) @if($field->detail) <div class="list-group-item"> <div class="row"> <div class="col-sm-2"> <b>{{ $field->label }}</b> </div> <div class="col-sm-8"> @if($field->detail_view_custom || $field->detail_view) @include($field->detail_view_custom ? $field->detail_view_custom : $field->detail_view, $field->detail_view_custom_data) @elseif($field->detail_alias) {{ $model->{$field->detail_alias[0]}->{$field->detail_alias[1]} }} @elseif(is_array($model->{$field->name})) <pre class="p-0 mb-0">{{ json_encode($model->{$field->name}, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}</pre> @else {{ $model->{$field->name} }} @endif </div> </div> </div> @endif @endforeach </div> </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/guest.blade.php
resources/views/layouts/guest.blade.php
@extends('valiant::layouts.app') @section('body-class', 'login-page') @section('parent-content') <div class="login-box"> <div class="login-logo"> <a href="{{ url('/') }}"><b>{{ config('app.name') }}</b></a> </div> <div class="card"> <div class="card-body login-card-body"> @yield('child-content') </div> </div> </div> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/auth.blade.php
resources/views/layouts/auth.blade.php
@extends('valiant::layouts.app') @section('body-class', 'sidebar-mini') @section('parent-content') <div class="wrapper"> <nav class="main-header navbar navbar-expand navbar-white navbar-light"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a> </li> </ul> <ul class="navbar-nav ml-auto"> @include('valiant::layouts.navs.header') </ul> </nav> <aside class="main-sidebar sidebar-dark-primary elevation-4"> <a href="{{ url('/home') }}" class="brand-link"> <img src="{{ asset('valiant/img/logo.png') }}" alt="AdminLTE Logo" class="brand-image"> <span class="brand-text font-weight-light">{{ config('app.name') }}</span> </a> <div class="sidebar"> <nav class="mt-2"> <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> @include('valiant::layouts.navs.sidebar') </ul> </nav> </div> </aside> <div class="content-wrapper"> <div class="content-header"> <div class="container-fluid"> @yield('child-header') </div> </div> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col"> @yield('child-content') </div> </div> </div> </section> </div> <footer class="main-footer"> <strong>Copyright &copy; {{ date('Y') }} <a href="{{ url('/') }}">{{ config('app.name') }}</a>.</strong> All rights reserved. </footer> </div> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/modal.blade.php
resources/views/layouts/modal.blade.php
<div class="modal fade" tabindex="-1" role="dialog" data-backdrop="static" data-ajax-modal> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">@yield('title')</h5> <button type="button" class="close" data-dismiss="modal"> <span>&times;</span> </button> </div> @yield('child-content') </div> </div> </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/app.blade.php
resources/views/layouts/app.blade.php
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>@yield('title') | {{ config('app.name') }}</title> <link rel="stylesheet" href="{{ asset('valiant/css/fontawesome.min.css') }}"> <link rel="stylesheet" href="{{ asset('valiant/css/adminlte.min.css') }}"> <link rel="stylesheet" href="{{ asset('valiant/css/datatables.min.css') }}"> <link rel="stylesheet" href="{{ asset('valiant/css/valiant.css') }}"> <link rel="stylesheet" href="{{ asset('valiant/css/custom.css') }}"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700"> <link rel="icon" href="{{ asset('valiant/img/favicon.png') }}"> </head> <body class="hold-transition @yield('body-class')"> @yield('parent-content') <script src="{{ asset('valiant/js/jquery.min.js') }}"></script> <script src="{{ asset('valiant/js/bootstrap.min.js') }}"></script> <script src="{{ asset('valiant/js/adminlte.min.js') }}"></script> <script src="{{ asset('valiant/js/datatables.min.js') }}"></script> <script src="{{ asset('valiant/js/valiant.js') }}"></script> <script src="{{ asset('valiant/js/custom.js') }}"></script> @if(session('status')) <script>$(document).Toasts('create', {class: 'bg-success', title: 'Success', body: '{{ session('status') }}', autohide: true, delay: 3000});</script> @elseif($errors->any()) <script>$(document).Toasts('create', {class: 'bg-danger', title: 'Error', body: 'The given data was invalid.', autohide: true, delay: 3000});</script> @endif @stack('scripts') </body> </html>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/navs/header.blade.php
resources/views/layouts/navs/header.blade.php
<li class="nav-item dropdown"> <a class="nav-link" data-toggle="dropdown" href="#"> <i class="fa fa-user"></i> </a> <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right"> <span class="dropdown-header">{{ Auth::user()->name }}</span> <div class="dropdown-divider"></div> <a href="{{ url('profile/edit') }}" class="dropdown-item"> <i class="fa fa-fw fa-edit mr-2"></i> Edit Profile </a> <div class="dropdown-divider"></div> <a href="{{ url('profile/password') }}" class="dropdown-item"> <i class="fa fa-fw fa-lock mr-2"></i> Change Password </a> <div class="dropdown-divider"></div> <form method="POST" action="{{ route('logout') }}"> @csrf <button class="dropdown-item"> <i class="fa fa-fw fa-sign-out-alt mr-2"></i> Logout </button> </form> </div> </li>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/layouts/navs/sidebar.blade.php
resources/views/layouts/navs/sidebar.blade.php
@can('Admin') <li class="nav-item"> <a href="{{ url('users') }}" class="nav-link {{ Request::is('users') ? 'active' : '' }}"> <i class="nav-icon fa fa-users"></i> <p>Users</p> </a> </li> <li class="nav-item"> <a href="{{ url('logs') }}" class="nav-link {{ Request::is('logs') ? 'active' : '' }}"> <i class="nav-icon fa fa-file-alt"></i> <p>Logs</p> </a> </li> @endcan
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/users/password.blade.php
resources/views/users/password.blade.php
@extends('valiant::layouts.auth') @section('title', 'Change ' . $model->view_title . ' Password') @section('child-header') <div class="row"> <div class="col-sm"> <h1 class="mb-2 text-dark">@yield('title')</h1> </div> <div class="col-sm-auto"> @include('valiant::models.actions.single') </div> </div> @endsection @section('child-content') <form method="POST" action="{{ url($model->getTable() . '/password/' . $model->id) }}" enctype="multipart/form-data"> @csrf <div class="card"> <div class="list-group list-group-flush"> @include('valiant::inputs.list', ['action' => 'password']) </div> <div class="card-footer text-center bg-light rounded-bottom"> <button type="submit" name="_submit" value="save" class="btn btn-primary">Save</button> <button type="submit" name="_submit" value="back" class="btn btn-primary">Save &amp; Go Back</button> </div> </div> </form> @endsection
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/users/actions/password-button.blade.php
resources/views/users/actions/password-button.blade.php
<a href="{{ url($model->getTable() . '/password/' . $model->id) }}" class="btn {{ Request::ajax() ? 'btn-sm' : '' }} btn{{ !Request::is($model->getTable() . '/password/' . $model->id) ? '-outline' : '' }}-primary px-btn" title="Password" > <i class="fa fa-fw fa-lock"></i> </a>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/radio.blade.php
resources/views/inputs/radio.blade.php
<div class="p-label"> @foreach($field->input_options as $value => $label) <div class="form-check"> <input type="radio" name="{{ $field->name }}" id="{{ $field->name . '.' . $loop->index }}" class="form-check-input @error($field->name) is-invalid @enderror" value="{{ $value }}" {{ old($field->name, $model->{$field->name}) == $value || $loop->first ? 'checked' : '' }} > <label for="{{ $field->name . '.' . $loop->index }}" class="form-check-label"> {{ $label }} </label> </div> @endforeach @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/file.blade.php
resources/views/inputs/file.blade.php
<div class="custom-file"> <input type="file" name="{{ $field->name }}" id="{{ $field->name }}" class="custom-file-input @error($field->name) is-invalid @enderror" > <label for="{{ $field->name }}" class="custom-file-label"> Choose File </label> </div> @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror @include('valiant::inputs.files-list')
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/select.blade.php
resources/views/inputs/select.blade.php
<select name="{{ $field->name }}" id="{{ $field->name }}" class="custom-select @error($field->name) is-invalid @enderror" > <option value=""></option> @foreach($field->input_options as $value => $label) <option value="{{ $value }}" {{ old($field->name, $model->{$field->name}) == $value ? 'selected' : '' }}> {{ $label }} </option> @endforeach </select> @error($field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/checkbox.blade.php
resources/views/inputs/checkbox.blade.php
<input type="hidden" name="{{ $field->name }}" value="0"> <div class="p-label"> <div class="form-check"> <input type="checkbox" name="{{ $field->name }}" id="{{ $field->name }}" class="form-check-input @error($field->name) is-invalid @enderror" value="1" {{ old($field->name, $model->{$field->name}) ? 'checked' : '' }} > <label for="{{ $field->name }}" class="form-check-label"></label> </div> @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/text.blade.php
resources/views/inputs/text.blade.php
<input type="{{ $field->input_type }}" name="{{ $field->name }}" id="{{ $field->name }}" class="form-control @error($field->name) is-invalid @enderror" value="{{ !in_array($field->name, $model->getHidden()) ? old($field->name, $model->{$field->name}) : '' }}" > @error($field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/checkboxes.blade.php
resources/views/inputs/checkboxes.blade.php
<input type="hidden" name="{{ $field->name }}"> <div class="p-label"> @foreach($field->input_options as $value => $label) <div class="form-check"> <input type="checkbox" name="{{ $field->name }}[]" id="{{ $field->name . '.' . $loop->index }}" class="form-check-input @error($field->name) is-invalid @enderror" value="{{ $value }}" {{ is_array(old($field->name, $model->{$field->name})) && in_array($value, old($field->name, $model->{$field->name})) ? 'checked' : '' }} > <label for="{{ $field->name . '.' . $loop->index }}" class="form-check-label"> {{ $label }} </label> </div> @endforeach @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/plaintext.blade.php
resources/views/inputs/plaintext.blade.php
<input type="text" class="form-control-plaintext" value="{{ $model->{$field->name} }}" readonly >
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/files.blade.php
resources/views/inputs/files.blade.php
<div class="custom-file"> <input type="file" name="{{ $field->name }}[]" id="{{ $field->name }}" class="custom-file-input @error($field->name) is-invalid @enderror" multiple > <label for="{{ $field->name }}" class="custom-file-label"> Choose Files </label> </div> @error($field->name . '*') <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror @include('valiant::inputs.files-list')
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/switch.blade.php
resources/views/inputs/switch.blade.php
<input type="hidden" name="{{ $field->name }}" value="0"> <div class="p-label"> <div class="custom-control custom-switch"> <input type="checkbox" name="{{ $field->name }}" id="{{ $field->name }}" class="custom-control-input @error($field->name) is-invalid @enderror" value="1" {{ old($field->name, $model->{$field->name}) ? 'checked' : '' }} > <label for="{{ $field->name }}" class="custom-control-label"></label> </div> @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/files-list.blade.php
resources/views/inputs/files-list.blade.php
@if($model->{$field->name}) <div class="list-group list-group-hover"> @foreach($model->{$field->name} as $key => $file) <div class="list-group-item p-2 border-bottom-0" data-file="{{ $key }}"> <div class="form-row align-items-center"> <div class="col"> <a href="{{ asset($file['file']) }}" target="_blank"> <i class="fa {{ file_icon($file['mime_type']) }} mr-1"></i> {{ $file['name'] }} </a> </div> <div class="col-auto"> <button type="button" data-ajax-post="{{ url($model->getTable() . '/delete-file/' . $model->id . '/' . $field->name . '/' . $key) }}" data-ajax-token="{{ csrf_token() }}" data-confirm="Are you sure?" class="btn btn-sm btn-outline-danger px-btn" title="Delete" > <i class="fa fa-fw fa-trash"></i> </button> </div> </div> </div> @endforeach </div> @endif
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/list.blade.php
resources/views/inputs/list.blade.php
@foreach($model->fieldInputs($action) as $field) <div class="list-group-item"> <div class="row"> <label for="{{ $field->name }}" class="col-sm-2 col-form-label">{{ $field->label }}</label> <div class="col-sm-8"> @include($field->input_view_custom ? $field->input_view_custom : $field->input_view, $field->input_view_custom_data) </div> </div> </div> @endforeach
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/textarea.blade.php
resources/views/inputs/textarea.blade.php
<textarea type="{{ $field->input_type }}" name="{{ $field->name }}" id="{{ $field->name }}" class="form-control @error($field->name) is-invalid @enderror" rows="{{ $field->input_rows }}" >{{ old($field->name, $model->{$field->name}) }}</textarea> @error($field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/select.blade.php
resources/views/inputs/arrays/select.blade.php
<select name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" class="custom-select custom-select-sm @error($field->name . '.' . $id . '.' . $array_field->name) is-invalid @enderror" > <option value="" disabled {{ !old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') ? 'selected' : '' }}> {{ $array_field->label }} </option> @foreach($array_field->input_options as $v => $l) <option value="{{ $v }}" {{ old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') == $v ? 'selected' : '' }}> {{ $l }} </option> @endforeach </select> @error($field->name . '.' . $id . '.' . $array_field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/checkbox.blade.php
resources/views/inputs/arrays/checkbox.blade.php
<input type="hidden" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" value="0"> <div class="form-check"> <input type="checkbox" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" id="{{ $field->name . '.' . $id . '.' . $array_field->name }}" class="form-check-input @error($field->name . '.' . $id . '.' . $array_field->name) is-invalid @enderror" value="1" {{ old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') ? 'checked' : '' }} > <label for="{{ $field->name . '.' . $id . '.' . $array_field->name }}" class="form-check-label small"> {{ $array_field->label }} </label> </div> @error($field->name . '.' . $id . '.' . $array_field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/text.blade.php
resources/views/inputs/arrays/text.blade.php
<input type="{{ $array_field->input_type }}" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" class="form-control form-control-sm @error($field->name . '.' . $id . '.' . $array_field->name) is-invalid @enderror" placeholder="{{ $array_field->label }}" value="{{ old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') }}" > @error($field->name . '.' . $id . '.' . $array_field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/switch.blade.php
resources/views/inputs/arrays/switch.blade.php
<input type="hidden" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" value="0"> <div class="custom-control custom-switch"> <input type="checkbox" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" id="{{ $field->name . '.' . $id . '.' . $array_field->name }}" class="custom-control-input @error($field->name . '.' . $id . '.' . $array_field->name) is-invalid @enderror" value="1" {{ old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') ? 'checked' : '' }} > <label for="{{ $field->name . '.' . $id . '.' . $array_field->name }}" class="custom-control-label small"> {{ $array_field->label }} </label> </div> @error($field->name . '.' . $id . '.' . $array_field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/item.blade.php
resources/views/inputs/arrays/item.blade.php
<div class="list-group-item p-2 border-bottom-0" data-field="{{ $id }}"> <div class="form-row"> @foreach($field->input_fields as $array_field) <div class="{{ $array_field->input_column_class }}"> @include($array_field->input_view_custom ? $array_field->input_view_custom : $array_field->input_view, $array_field->input_view_custom_data) </div> @endforeach <div class="col-auto"> <button type="button" data-ajax-post="{{ url($model->getTable() . '/delete-field/' . $id) }}" data-ajax-token="{{ csrf_token() }}" data-confirm="Are you sure?" class="btn btn-sm btn-outline-danger px-btn" title="Delete" > <i class="fa fa-fw fa-trash"></i> </button> </div> </div> </div>
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/list.blade.php
resources/views/inputs/arrays/list.blade.php
<input type="hidden" name="{{ $field->name }}"> <div class="list-group list-group-hover" data-fields="{{ $field->name }}"> @if(old($field->name, $model->{$field->name})) @foreach(old($field->name, $model->{$field->name}) as $id => $value) @include('valiant::inputs.arrays.item') @endforeach @endif </div> <button type="button" data-ajax-post="{{ url($model->getTable() . '/add-field/' . $field->name) }}" data-ajax-token="{{ csrf_token() }}" class="btn btn-outline-primary" > Add {{ Str::singular($field->label) }} </button> @error($field->name) <span class="invalid-feedback d-block" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
kdion4891/valiant
https://github.com/kdion4891/valiant/blob/c15e4354e88022ebb36bcba05575406e9c041b39/resources/views/inputs/arrays/textarea.blade.php
resources/views/inputs/arrays/textarea.blade.php
<textarea type="{{ $array_field->input_type }}" name="{{ $field->name }}[{{ $id }}][{{ $array_field->name }}]" class="form-control form-control-sm @error($field->name . '.' . $id . '.' . $array_field->name) is-invalid @enderror" placeholder="{{ $array_field->label }}" rows="{{ $field->input_rows }}" >{{ old($field->name . '.' . $id . '.' . $array_field->name, $value[$array_field->name] ?? '') }}</textarea> @error($field->name . '.' . $id . '.' . $array_field->name) <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span> @enderror
php
MIT
c15e4354e88022ebb36bcba05575406e9c041b39
2026-01-05T05:17:55.748994Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/src/SocialCredentials.php
src/SocialCredentials.php
<?php namespace GeneaLabs\LaravelSocialiter; use GeneaLabs\LaravelOverridableModel\Traits\Overridable; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class SocialCredentials extends Model { use Overridable; protected $dates = [ "expires_at", ]; protected $fillable = [ "access_token", "avatar", "email", "expires_at", "name", "nickname", "provider_id", "provider_name", "refresh_token", "user_id", ]; public function user() : BelongsTo { $userClass = config("auth.providers.users.model"); return $this->belongsTo($userClass); } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/src/Socialiter.php
src/Socialiter.php
<?php namespace GeneaLabs\LaravelSocialiter; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Carbon; use Illuminate\Support\Str; use Laravel\Socialite\AbstractUser; use Laravel\Socialite\Facades\Socialite; class Socialiter { public static $runsMigrations = true; protected $isStateless = false; protected $config; protected $driver; protected $apiToken; public static function ignoreMigrations(): void { static::$runsMigrations = false; } public function driver(string $driver): self { $this->driver = $driver; return $this; } public function login(): Model { $socialite = Socialite::driver($this->driver); if ($this->config) { $socialite = $socialite ->setConfig($this->config); } if ($this->isStateless) { $socialite = $socialite->stateless(); } $socialiteUser = $socialite->user(); return $this->performLogin($socialiteUser); } public function apiLogin(AbstractUser $socialiteUser, string $apiToken): Model { $this->apiToken = $apiToken; return $this->performLogin($socialiteUser); } protected function performLogin(AbstractUser $socialiteUser): Model { $user = $this ->getUser($socialiteUser, $this->driver); $user->load("socialCredentials"); auth()->login($user); return $user; } protected function getUser(AbstractUser $socialiteUser): Model { return $this ->createCredentials($socialiteUser) ->user; } protected function createUser(AbstractUser $socialiteUser): Model { $userClass = config("auth.providers.users.model"); return (new $userClass) ->updateOrCreate([ "email" => $socialiteUser->getEmail(), ], [ "name" => $socialiteUser->getName(), "password" => Str::random(64), ]); } protected function createCredentials(AbstractUser $socialiteUser): SocialCredentials { $credentialsModel = SocialCredentials::model(); $socialiteCredentials = (new $credentialsModel) ->with("user") ->firstOrNew([ "provider_id" => $socialiteUser->getId(), "provider_name" => $this->driver, ]) ->fill([ "access_token" => $socialiteUser->token, "avatar" => $socialiteUser->getAvatar(), "email" => $socialiteUser->getEmail(), "expires_at" => (new Carbon)->now()->addSeconds($socialiteUser->expiresIn), "name" => $socialiteUser->getName(), "nickname" => $socialiteUser->getNickname(), "provider_id" => $socialiteUser->getId(), "provider_name" => $this->driver, "refresh_token" => $socialiteUser->refreshToken, ]); if (! $socialiteCredentials->exists) { $user = $this->createUser($socialiteUser); $socialiteCredentials->user()->associate($user); } $socialiteCredentials->save(); return $socialiteCredentials; } public function setConfig($config): self { $this->config = $config; return $this; } public function stateless(): self { $this->isStateless = true; return $this; } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/src/Traits/SocialCredentials.php
src/Traits/SocialCredentials.php
<?php namespace GeneaLabs\LaravelSocialiter\Traits; use GeneaLabs\LaravelSocialiter\SocialCredentials as GeneaLabsSocialCredentials; use Illuminate\Database\Eloquent\Relations\HasMany; trait SocialCredentials { public function socialCredentials(): HasMany { return $this->hasMany(GeneaLabsSocialCredentials::class); } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/src/Facades/Socialiter.php
src/Facades/Socialiter.php
<?php namespace GeneaLabs\LaravelSocialiter\Facades; use Illuminate\Support\Facades\Facade; class Socialiter extends Facade { protected static function getFacadeAccessor() { return 'socialiter'; } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/src/Providers/ServiceProvider.php
src/Providers/ServiceProvider.php
<?php namespace GeneaLabs\LaravelSocialiter\Providers; use GeneaLabs\LaravelSocialiter\Socialiter; use Illuminate\Support\ServiceProvider as LaravelServiceProvider; class ServiceProvider extends LaravelServiceProvider { protected $defer = false; public function boot() { if (Socialiter::$runsMigrations) { $this->loadMigrationsFrom(__DIR__ . "/../../database/migrations"); } $this->publishes( [ __DIR__ . '/../../database/migrations/' => database_path('migrations') ], 'migrations' ); } public function register() { // $this->registerConfiguration(); $this->registerFacade(); } protected function registerFacade() { $this->app->bind( 'socialiter', function () { return new Socialiter; } ); } // protected function registerConfiguration() // { // $this->mergeConfigFrom( // __DIR__ . '/../../config/services.php', // 'services' // ); // } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
mikebronner/laravel-socialiter
https://github.com/mikebronner/laravel-socialiter/blob/048874199c34b9147428f1bdc3909cfca3b27204/database/migrations/2019_10_13_000000_create_social_credentials_table.php
database/migrations/2019_10_13_000000_create_social_credentials_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateSocialCredentialsTable extends Migration { public function up(): void { Schema::create('social_credentials', function (Blueprint $table) { $table->id("id"); $table->bigInteger("user_id"); $table->timestamps(); $table->text("access_token")->nullable(); $table->string("avatar")->nullable(); $table->string("email")->nullable(); $table->string("expires_at")->nullable(); $table->string("name")->nullable(); $table->string("nickname")->nullable(); $table->string("provider_id")->nullable(); $table->string("provider_name")->nullable(); $table->text("refresh_token")->nullable(); }); } public function down(): void { Schema::drop('social_credentials'); } }
php
MIT
048874199c34b9147428f1bdc3909cfca3b27204
2026-01-05T05:18:25.701242Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/footer.php
your-clean-template-3_uncommented/footer.php
<?php /** * Шаблон подвала (footer.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <footer> <div class="container"> <div class="row"> <div class="col-md-12"> <?php $args = array( 'theme_location' => 'bottom', 'container'=> false, 'menu_class' => 'nav nav-pills bottom-menu', 'menu_id' => 'bottom-nav', 'fallback_cb' => false ); wp_nav_menu($args); ?> </div> </div> </div> </footer> <?php wp_footer(); ?> </body> </html>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/author.php
your-clean-template-3_uncommented/author.php
<?php /** * Страница автора (author.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?> <h1>Посты автора <?php echo $curauth->nickname; ?></h1> <div class="media"> <div class="media-left"> <?php echo get_avatar($curauth->ID, 64, '', $curauth->nickname, array('class' => 'media-object')); ?> </div> <div class="media-body"> <h4 class="media-heading"><?php echo $curauth->display_name; ?></h4> <?php if ($curauth->user_url) echo '<a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a>'; ?> <?php if ($curauth->description) echo '<p>'.$curauth->description.'</p>'; ?> </div> </div> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/page.php
your-clean-template-3_uncommented/page.php
<?php /** * Шаблон обычной страницы (page.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </article> <?php endwhile; ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/loop.php
your-clean-template-3_uncommented/loop.php
<?php /** * Запись в цикле (loop.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="meta"> <p>Опубликовано: <?php the_time(get_option('date_format')." в ".get_option('time_format')); ?></p> <p>Автор: <?php the_author_posts_link(); ?></p> <p>Категории: <?php the_category(',') ?></p> <?php the_tags('<p>Тэги: ', ',', '</p>'); ?> </div> <div class="row"> <?php if ( has_post_thumbnail() ) { ?> <div class="col-sm-3"> <a href="<?php the_permalink(); ?>" class="thumbnail"> <?php the_post_thumbnail(); ?> </a> </div> <?php } ?> <div class="<?php if ( has_post_thumbnail() ) { ?>col-sm-9<?php } else { ?>col-sm-12<?php } ?>"> <?php the_content(''); ?> </div> </div> </article>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/page-custom.php
your-clean-template-3_uncommented/page-custom.php
<?php /** * Страница с кастомным шаблоном (page-custom.php) * @package WordPress * @subpackage your-clean-template-3 * Template Name: Страница с кастомным шаблоном */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </article> <?php endwhile; ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/archive.php
your-clean-template-3_uncommented/archive.php
<?php /** * Страница архивов записей (archive.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1><?php // заголовок архивов if (is_day()) : printf('Daily Archives: %s', get_the_date()); elseif (is_month()) : printf('Monthly Archives: %s', get_the_date('F Y')); elseif (is_year()) : printf('Yearly Archives: %s', get_the_date('Y')); else : 'Archives'; endif; ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/comments.php
your-clean-template-3_uncommented/comments.php
<?php /** * Шаблон комментариев (comments.php) * Выводит список комментариев и форму добавления * @package WordPress * @subpackage your-clean-template-3 */ ?> <div id="comments"> <h2>Всего комментариев: <?php echo get_comments_number(); ?></h2> <?php if (have_comments()) : ?> <ul class="comment-list media-list"> <?php $args = array( 'walker' => new clean_comments_constructor, ); wp_list_comments($args); ?> </ul> <?php if (get_comment_pages_count() > 1 && get_option( 'page_comments')) : ?> <?php $args = array( 'prev_text' => '«', 'next_text' => '»', 'type' => 'array', 'echo' => false ); $page_links = paginate_comments_links($args); if( is_array( $page_links ) ) { echo '<ul class="pagination comments-pagination">'; foreach ( $page_links as $link ) { if ( strpos( $link, 'current' ) !== false ) echo "<li class='active'>$link</li>"; else echo "<li>$link</li>"; } echo '</ul>'; } ?> <?php endif; ?> <?php endif; ?> <?php if (comments_open()) { $fields = array( 'author' => '<div class="form-group"><label for="author">Имя</label><input class="form-control" id="author" name="author" type="text" value="'.esc_attr($commenter['comment_author']).'" size="30" required></div>', 'email' => '<div class="form-group"><label for="email">Email</label><input class="form-control" id="email" name="email" type="email" value="'.esc_attr($commenter['comment_author_email']).'" size="30" required></div>', 'url' => '<div class="form-group"><label for="url">Сайт</label><input class="form-control" id="url" name="url" type="text" value="'.esc_attr($commenter['comment_author_url']).'" size="30"></div>', ); $args = array( 'fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<div class="form-group"><label for="comment">Комментарий:</label><textarea class="form-control" id="comment" name="comment" cols="45" rows="8" required></textarea></div>', 'must_log_in' => '<p class="must-log-in">Вы должны быть зарегистрированы! '.wp_login_url(apply_filters('the_permalink',get_permalink())).'</p>', 'logged_in_as' => '<p class="logged-in-as">'.sprintf(__( 'Вы вошли как <a href="%1$s">%2$s</a>. <a href="%3$s">Выйти?</a>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink',get_permalink()))).'</p>', 'comment_notes_before' => '<p class="comment-notes">Ваш email не будет опубликован.</p>', 'comment_notes_after' => '<p class="help-block form-allowed-tags">'.sprintf(__( 'Вы можете использовать следующие <abbr>HTML</abbr> тэги: %s'),'<code>'.allowed_tags().'</code>').'</p>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => 'Оставить комментарий', 'title_reply_to' => 'Ответить %s', 'cancel_reply_link' => 'Отменить ответ', 'label_submit' => 'Отправить', 'class_submit' => 'btn btn-default' ); comment_form($args); } ?> </div>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/category.php
your-clean-template-3_uncommented/category.php
<?php /** * Шаблон рубрики (category.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1><?php single_cat_title(); ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/search.php
your-clean-template-3_uncommented/search.php
<?php /** * Шаблон поиска (search.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1><?php printf('Поиск по строке: %s', get_search_query()); ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/tag.php
your-clean-template-3_uncommented/tag.php
<?php /** * tag template (tag.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1><?php printf('Посты с тэгом: %s', single_tag_title('', false)); ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/functions.php
your-clean-template-3_uncommented/functions.php
<?php /** * Функции шаблона (function.php) * @package WordPress * @subpackage your-clean-template-3 */ add_theme_support('title-tag'); register_nav_menus(array( 'top' => 'Верхнее', 'bottom' => 'Внизу' )); add_theme_support('post-thumbnails'); set_post_thumbnail_size(250, 150); add_image_size('big-thumb', 400, 400, true); register_sidebar(array( 'name' => 'Сайдбар', 'id' => "sidebar", 'description' => 'Обычная колонка в сайдбаре', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => "</div>\n", 'before_title' => '<span class="widgettitle">', 'after_title' => "</span>\n", )); if (!class_exists('clean_comments_constructor')) { class clean_comments_constructor extends Walker_Comment { public function start_lvl( &$output, $depth = 0, $args = array()) { $output .= '<ul class="children">' . "\n"; } public function end_lvl( &$output, $depth = 0, $args = array()) { $output .= "</ul><!-- .children -->\n"; } protected function comment( $comment, $depth, $args ) { $classes = implode(' ', get_comment_class()).($comment->comment_author_email == get_the_author_meta('email') ? ' author-comment' : ''); echo '<li id="comment-'.get_comment_ID().'" class="'.$classes.' media">'."\n"; echo '<div class="media-left">'.get_avatar($comment, 64, '', get_comment_author(), array('class' => 'media-object'))."</div>\n"; echo '<div class="media-body">'; echo '<span class="meta media-heading">Автор: '.get_comment_author()."\n"; //echo ' '.get_comment_author_email(); echo ' '.get_comment_author_url(); echo ' Добавлено '.get_comment_date('F j, Y в H:i')."\n"; if ( '0' == $comment->comment_approved ) echo '<br><em class="comment-awaiting-moderation">Ваш комментарий будет опубликован после проверки модератором.</em>'."\n"; echo "</span>"; comment_text()."\n"; $reply_link_args = array( 'depth' => $depth, 'reply_text' => 'Ответить', 'login_text' => 'Вы должны быть залогинены' ); echo get_comment_reply_link(array_merge($args, $reply_link_args)); echo '</div>'."\n"; } public function end_el( &$output, $comment, $depth = 0, $args = array() ) { $output .= "</li><!-- #comment-## -->\n"; } } } if (!function_exists('pagination')) { function pagination() { global $wp_query; $big = 999999999; $links = paginate_links(array( 'base' => str_replace($big,'%#%',esc_url(get_pagenum_link($big))), 'format' => '?paged=%#%', 'current' => max(1, get_query_var('paged')), 'type' => 'array', 'prev_text' => 'Назад', 'next_text' => 'Вперед', 'total' => $wp_query->max_num_pages, 'show_all' => false, 'end_size' => 15, 'mid_size' => 15, 'add_args' => false, 'add_fragment' => '', 'before_page_number' => '', 'after_page_number' => '' )); if( is_array( $links ) ) { echo '<ul class="pagination">'; foreach ( $links as $link ) { if ( strpos( $link, 'current' ) !== false ) echo "<li class='active'>$link</li>"; else echo "<li>$link</li>"; } echo '</ul>'; } } } add_action('wp_footer', 'add_scripts'); if (!function_exists('add_scripts')) { function add_scripts() { if(is_admin()) return false; wp_deregister_script('jquery'); wp_enqueue_script('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js','','',true); wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.min.js','','',true); wp_enqueue_script('main', get_template_directory_uri().'/js/main.js','','',true); } } add_action('wp_print_styles', 'add_styles'); if (!function_exists('add_styles')) { function add_styles() { if(is_admin()) return false; wp_enqueue_style( 'bs', get_template_directory_uri().'/css/bootstrap.min.css' ); wp_enqueue_style( 'main', get_template_directory_uri().'/style.css' ); } } if (!class_exists('bootstrap_menu')) { class bootstrap_menu extends Walker_Nav_Menu { private $open_submenu_on_hover; function __construct($open_submenu_on_hover = true) { $this->open_submenu_on_hover = $open_submenu_on_hover; } function start_lvl(&$output, $depth = 0, $args = array()) { $output .= "\n<ul class=\"dropdown-menu\">\n"; } function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) { $item_html = ''; parent::start_el($item_html, $item, $depth, $args); if ( $item->is_dropdown && $depth === 0 ) { if (!$this->open_submenu_on_hover) $item_html = str_replace('<a', '<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"', $item_html); $item_html = str_replace('</a>', ' <b class="caret"></b></a>', $item_html); } $output .= $item_html; } function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) { if ( $element->current ) $element->classes[] = 'active'; $element->is_dropdown = !empty( $children_elements[$element->ID] ); if ( $element->is_dropdown ) { if ( $depth === 0 ) { $element->classes[] = 'dropdown'; if ($this->open_submenu_on_hover) $element->classes[] = 'show-on-hover'; } elseif ( $depth === 1 ) { $element->classes[] = 'dropdown-submenu'; } } parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output); } } } if (!function_exists('content_class_by_sidebar')) { function content_class_by_sidebar() { if (is_active_sidebar( 'sidebar' )) { echo 'col-sm-9'; } else { echo 'col-sm-12'; } } } ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/index.php
your-clean-template-3_uncommented/index.php
<?php /** * Главная страница (index.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1><?php if (is_day()) : printf('Daily Archives: %s', get_the_date()); elseif (is_month()) : printf('Monthly Archives: %s', get_the_date('F Y')); elseif (is_year()) : printf('Yearly Archives: %s', get_the_date('Y')); else : 'Archives'; endif; ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php get_template_part('loop'); ?> <?php endwhile; else: echo '<p>Нет записей.</p>'; endif; ?> <?php pagination(); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/404.php
your-clean-template-3_uncommented/404.php
<?php /** * Страница 404 ошибки (404.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <h1>Ой, это 404!</h1> <p>Блаблабла 404 Блаблабла</p> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/header.php
your-clean-template-3_uncommented/header.php
<?php /** * Шаблон шапки (header.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php /* RSS и всякое */ ?> <link rel="alternate" type="application/rdf+xml" title="RDF mapping" href="<?php bloginfo('rdf_url'); ?>"> <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php bloginfo('rss_url'); ?>"> <link rel="alternate" type="application/rss+xml" title="Comments RSS" href="<?php bloginfo('comments_rss2_url'); ?>"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <header> <div class="container"> <div class="row"> <div class="col-md-12"> <nav class="navbar navbar-default"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topnav" aria-expanded="false"> <span class="sr-only">Меню</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="topnav"> <?php $args = array( 'theme_location' => 'top', 'container'=> false, 'menu_id' => 'top-nav-ul', 'items_wrap' => '<ul id="%1$s" class="nav navbar-nav %2$s">%3$s</ul>', 'menu_class' => 'top-menu', 'walker' => new bootstrap_menu(true) ); wp_nav_menu($args); ?> </div> </nav> </div> </div> </div> </header>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/single.php
your-clean-template-3_uncommented/single.php
<?php /** * Шаблон отдельной записи (single.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); ?>"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h1><?php the_title(); ?></h1> <div class="meta"> <p>Опубликовано: <?php the_time(get_option('date_format')." в ".get_option('time_format')); ?></p> <p>Автор: <?php the_author_posts_link(); ?></p> <p>Категории: <?php the_category(',') ?></p> <?php the_tags('<p>Тэги: ', ',', '</p>'); ?> </div> <?php the_content(); ?> </article> <?php endwhile; ?> <?php previous_post_link('%link', '<- Предыдущий пост: %title', TRUE); ?> <?php next_post_link('%link', 'Следующий пост: %title ->', TRUE); ?> <?php if (comments_open() || get_comments_number()) comments_template('', true); ?> </div> <?php get_sidebar(); ?> </div> </div> </section> <?php get_footer(); ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/searchform.php
your-clean-template-3_uncommented/searchform.php
<?php /** * Шаблон формы поиска (searchform.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <form role="search" method="get" class="search-form form-inline" action="<?php echo home_url( '/' ); ?>"> <div class="form-group"> <label class="sr-only" for="search-field">Поиск</label> <input type="search" class="form-control input-sm" id="search-field" placeholder="Строка для поиска" value="<?php echo get_search_query() ?>" name="s"> </div> <button type="submit" class="btn btn-default btn-sm">Искать</button> </form>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3_uncommented/sidebar.php
your-clean-template-3_uncommented/sidebar.php
<?php /** * Шаблон сайдбара (sidebar.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <?php if (is_active_sidebar( 'sidebar' )) { ?> <aside class="col-sm-3"> <?php dynamic_sidebar('sidebar'); ?> </aside> <?php } ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/footer.php
your-clean-template-3/footer.php
<?php /** * Шаблон подвала (footer.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <footer> <div class="container"> <div class="row"> <div class="col-md-12"> <?php $args = array( // опции для вывода нижнего меню, чтобы они работали, меню должно быть создано в админке 'theme_location' => 'bottom', // идентификатор меню, определен в register_nav_menus() в function.php 'container'=> false, // обертка списка, false - это ничего 'menu_class' => 'nav nav-pills bottom-menu', // класс для ul 'menu_id' => 'bottom-nav', // id для ul 'fallback_cb' => false ); wp_nav_menu($args); // выводим нижние меню ?> </div> </div> </div> </footer> <?php wp_footer(); // необходимо для работы плагинов и функционала ?> </body> </html>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/author.php
your-clean-template-3/author.php
<?php /** * Страница автора (author.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); // получим данные о авторе ?> <h1>Посты автора <?php echo $curauth->nickname; ?></h1> <?php /* Немного инфы о авторе */ ?> <div class="media"> <div class="media-left"> <?php echo get_avatar($curauth->ID, 64, '', $curauth->nickname, array('class' => 'media-object')); // покажим аватарку ?> </div> <div class="media-body"> <h4 class="media-heading"><?php echo $curauth->display_name; // тут может быть имя или ник, в зависимости что выберет автор ?></h4> <?php if ($curauth->user_url) echo '<a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a>'; // если есть сайт ?> <?php if ($curauth->description) echo '<p>'.$curauth->description.'</p>'; // если есть описание ?> </div> </div> <?php if (have_posts()) : while (have_posts()) : the_post(); // если посты есть - запускаем цикл wp ?> <?php get_template_part('loop'); // для отображения каждой записи берем шаблон loop.php ?> <?php endwhile; // конец цикла else: echo '<p>Нет записей.</p>'; endif; // если записей нет, напишим "простите" ?> <?php pagination(); // пагинация, функция нах-ся в function.php ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/page.php
your-clean-template-3/page.php
<?php /** * Шаблон обычной страницы (page.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); // старт цикла ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php // контэйнер с классами и id ?> <h1><?php the_title(); // заголовок поста ?></h1> <?php the_content(); // контент ?> </article> <?php endwhile; // конец цикла ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/loop.php
your-clean-template-3/loop.php
<?php /** * Запись в цикле (loop.php) * @package WordPress * @subpackage your-clean-template-3 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php // контэйнер с классами и id ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php // заголовок поста и ссылка на его полное отображение (single.php) ?> <div class="meta"> <p>Опубликовано: <?php the_time(get_option('date_format')." в ".get_option('time_format')); ?></p> <?php // дата и время создания ?> <p>Автор: <?php the_author_posts_link(); ?></p> <p>Категории: <?php the_category(',') ?></p> <?php // ссылки на категории в которых опубликован пост, через зпт ?> <?php the_tags('<p>Тэги: ', ',', '</p>'); // ссылки на тэги поста ?> </div> <div class="row"> <?php if ( has_post_thumbnail() ) { ?> <div class="col-sm-3"> <a href="<?php the_permalink(); ?>" class="thumbnail"> <?php the_post_thumbnail(); ?> </a> </div> <?php } ?> <div class="<?php if ( has_post_thumbnail() ) { ?>col-sm-9<?php } else { ?>col-sm-12<?php } // разные классы в зависимости есть ли миниатюра ?>"> <?php the_content(''); // пост превью, до more ?> </div> </div> </article>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/page-custom.php
your-clean-template-3/page-custom.php
<?php /** * Страница с кастомным шаблоном (page-custom.php) * @package WordPress * @subpackage your-clean-template-3 * Template Name: Страница с кастомным шаблоном */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); // старт цикла ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php // контэйнер с классами и id ?> <h1><?php the_title(); // заголовок поста ?></h1> <?php the_content(); // контент ?> </article> <?php endwhile; // конец цикла ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/archive.php
your-clean-template-3/archive.php
<?php /** * Страница архивов записей (archive.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <h1><?php // заголовок архивов if (is_day()) : printf('Daily Archives: %s', get_the_date()); // если по дням elseif (is_month()) : printf('Monthly Archives: %s', get_the_date('F Y')); // если по месяцам elseif (is_year()) : printf('Yearly Archives: %s', get_the_date('Y')); // если по годам else : 'Archives'; endif; ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); // если посты есть - запускаем цикл wp ?> <?php get_template_part('loop'); // для отображения каждой записи берем шаблон loop.php ?> <?php endwhile; // конец цикла else: echo '<p>Нет записей.</p>'; endif; // если записей нет, напишим "простите" ?> <?php pagination(); // пагинация, функция нах-ся в function.php ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/comments.php
your-clean-template-3/comments.php
<?php /** * Шаблон комментариев (comments.php) * Выводит список комментариев и форму добавления * @package WordPress * @subpackage your-clean-template-3 */ ?> <div id="comments"> <?php // див с этим id нужен для якорьных ссылок на комменты ?> <h2>Всего комментариев: <?php echo get_comments_number(); // общие кол-во комментов ?></h2> <?php if (have_comments()) : // если комменты есть ?> <ul class="comment-list media-list"> <?php $args = array( // аргументы для списка комментариев, некоторые опции выставляются в админке, остальное в классе clean_comments_constructor 'walker' => new clean_comments_constructor, // класс, который собирает все структуру комментов, нах-ся в function.php ); wp_list_comments($args); // выводим комменты ?> </ul> <?php if (get_comment_pages_count() > 1 && get_option( 'page_comments')) : // если страниц с комментами > 1 и пагинация комментариев включена ?> <?php $args = array( // аргументы для пагинации 'prev_text' => '«', // текст назад 'next_text' => '»', // текст вперед 'type' => 'array', 'echo' => false ); $page_links = paginate_comments_links($args); // выводим пагинацию if( is_array( $page_links ) ) { // если пагинация есть echo '<ul class="pagination comments-pagination">'; foreach ( $page_links as $link ) { if ( strpos( $link, 'current' ) !== false ) echo "<li class='active'>$link</li>"; // если это активная страница else echo "<li>$link</li>"; } echo '</ul>'; } ?> <?php endif; // если страниц с комментами > 1 и пагинация комментариев включена - конец ?> <?php endif; // // если комменты есть - конец ?> <?php if (comments_open()) { // если комментирование включено для данного поста /* ФОРМА КОММЕНТИРОВАНИЯ */ $fields = array( // разметка текстовых полей формы 'author' => '<div class="form-group"><label for="author">Имя</label><input class="form-control" id="author" name="author" type="text" value="'.esc_attr($commenter['comment_author']).'" size="30" required></div>', // поле Имя 'email' => '<div class="form-group"><label for="email">Email</label><input class="form-control" id="email" name="email" type="email" value="'.esc_attr($commenter['comment_author_email']).'" size="30" required></div>', // поле email 'url' => '<div class="form-group"><label for="url">Сайт</label><input class="form-control" id="url" name="url" type="text" value="'.esc_attr($commenter['comment_author_url']).'" size="30"></div>', // поле сайт ); $args = array( // опции формы комментирования 'fields' => apply_filters('comment_form_default_fields', $fields), // заменяем стандартные поля на поля из массива выше ($fields) 'comment_field' => '<div class="form-group"><label for="comment">Комментарий:</label><textarea class="form-control" id="comment" name="comment" cols="45" rows="8" required></textarea></div>', // разметка поля для комментирования 'must_log_in' => '<p class="must-log-in">Вы должны быть зарегистрированы! '.wp_login_url(apply_filters('the_permalink',get_permalink())).'</p>', // текст "Вы должны быть зарегистрированы!" 'logged_in_as' => '<p class="logged-in-as">'.sprintf(__( 'Вы вошли как <a href="%1$s">%2$s</a>. <a href="%3$s">Выйти?</a>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink',get_permalink()))).'</p>', // разметка "Вы вошли как" 'comment_notes_before' => '<p class="comment-notes">Ваш email не будет опубликован.</p>', // Текст до формы 'comment_notes_after' => '<p class="help-block form-allowed-tags">'.sprintf(__( 'Вы можете использовать следующие <abbr>HTML</abbr> тэги: %s'),'<code>'.allowed_tags().'</code>').'</p>', // текст после формы 'id_form' => 'commentform', // атрибут id формы 'id_submit' => 'submit', // атрибут id кнопки отправить 'title_reply' => 'Оставить комментарий', // заголовок формы 'title_reply_to' => 'Ответить %s', // "Ответить" текст 'cancel_reply_link' => 'Отменить ответ', // "Отменить ответ" текст 'label_submit' => 'Отправить', // Текст на кнопке отправить 'class_submit' => 'btn btn-default' // новый параметр с классом копки, добавлен с 4.1 ); comment_form($args); // показываем нашу форму } ?> </div>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/category.php
your-clean-template-3/category.php
<?php /** * Шаблон рубрики (category.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <h1><?php single_cat_title(); // название категории ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); // если посты есть - запускаем цикл wp ?> <?php get_template_part('loop'); // для отображения каждой записи берем шаблон loop.php ?> <?php endwhile; // конец цикла else: echo '<p>Нет записей.</p>'; endif; // если записей нет, напишим "простите" ?> <?php pagination(); // пагинация, функция нах-ся в function.php ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/search.php
your-clean-template-3/search.php
<?php /** * Шаблон поиска (search.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <h1><?php printf('Поиск по строке: %s', get_search_query()); // заголовок поиска ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); // если посты есть - запускаем цикл wp ?> <?php get_template_part('loop'); // для отображения каждой записи берем шаблон loop.php ?> <?php endwhile; // конец цикла else: echo '<p>Нет записей.</p>'; endif; // если записей нет, напишим "простите" ?> <?php pagination(); // пагинация, функция нах-ся в function.php ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false
saxap/clean-wp-template
https://github.com/saxap/clean-wp-template/blob/30d352222831f098d0f50785f5aa453744b2e07c/your-clean-template-3/tag.php
your-clean-template-3/tag.php
<?php /** * tag template (tag.php) * @package WordPress * @subpackage your-clean-template-3 */ get_header(); // подключаем header.php ?> <section> <div class="container"> <div class="row"> <div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>"> <h1><?php printf('Посты с тэгом: %s', single_tag_title('', false)); // заголовок тэга ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); // если посты есть - запускаем цикл wp ?> <?php get_template_part('loop'); // для отображения каждой записи берем шаблон loop.php ?> <?php endwhile; // конец цикла else: echo '<p>Нет записей.</p>'; endif; // если записей нет, напишим "простите" ?> <?php pagination(); // пагинация, функция нах-ся в function.php ?> </div> <?php get_sidebar(); // подключаем sidebar.php ?> </div> </div> </section> <?php get_footer(); // подключаем footer.php ?>
php
MIT
30d352222831f098d0f50785f5aa453744b2e07c
2026-01-05T05:18:29.067673Z
false