This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-testThis gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test| btn Button chk CheckBox ckl CheckedListBox | |
| cmb ComboBox dtp DateTimePicker lbl Label | |
| llb LinkLabel lst ListBox lvw ListView | |
| mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon | |
| nud NumeircUpDown pic PictureBox prg ProgressBar | |
| rdo RadioButton rtx RichTextBox txt TextBox | |
| tip ToolTip tvw TreeView wbs WebBrowser | |
| 容器 | |
| flp FlowLayoutPanel grp GroupBox pnl Panel |
| #!/usr/bin/env bash | |
| # REF: https://cloud.google.com/armor/docs/integrating-cloud-armor#with_ingress | |
| # REF: https://cloud.google.com/armor/docs/configure-security-policies | |
| # REF: https://cloud.google.com/iap/docs/load-balancer-howto | |
| # REF: https://cloud.google.com/sdk/gcloud/reference/compute/url-maps/add-path-matcher | |
| # REF: https://cloud.google.com/load-balancing/docs/https/setting-up-url-rewrite | |
| export PROJECT_ID=$(gcloud config get-value project) | |
| export PROJECT_USER=$(gcloud config get-value core/account) # set current user |
| use App\Http\Controllers\Auth\LoginController; | |
| Route::get('/login/{provider}', [LoginController::class, 'redirectToProvider']) | |
| ->name('social.login'); | |
| Route::get('/login/{provider}/callback', [LoginController::class, 'handleProviderCallback']) | |
| ->name('social.callback'); |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| // ... | |
| // If you want to support verify you can add implements | |
| class User extends Authenticatable | |
| { | |
| use Notifiable; | |
| use SoftDeletes; | |
| // ... | |
| <div> | |
| @php | |
| $providers = [ | |
| 'google' => [ | |
| 'bgColor' => '#ec462f', | |
| 'icon' => 'fab fa-google', | |
| ], | |
| 'facebook' => [ | |
| 'bgColor' => '#1877f2', | |
| 'icon' => 'fab fa-facebook-f', |
| <?php | |
| use Illuminate\Support\Facades\Route; | |
| use App\Http\Controllers\Auth\LoginController; | |
| // ... | |
| Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () { | |
| return Inertia\Inertia::render('Dashboard'); | |
| })->name('dashboard'); |
| <?php | |
| namespace App\Http\Controllers\Auth; | |
| use App\Http\Controllers\Controller; | |
| use App\Providers\RouteServiceProvider; | |
| use Illuminate\Support\Facades\Auth; | |
| use Illuminate\Http\Request; | |
| use Socialite; |
| // app/Actions/Fortify/CreateNewUser.php@create | |
| // app/Actions/Fortify/UpdateUserProfileInformation.php@update | |
| // unique rule | |
| Validator::make($input, [ | |
| 'name' => ['required', 'string', 'max:255'], | |
| 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email,NULL,id,deleted_at,NULL'], | |
| 'password' => $this->passwordRules(), | |
| ])->validate(); |