skip to Main Content

Laravel File system auth

I try build a Laravel authentication application that is based on file system storage and in database based way parallel. I made a method, like this: private function fileAuth(array $credentials): void { $userFileName = config('backup_values.backup_path') . $credentials['email'] . '.json'; $user…

VIEW QUESTION

Laravel Elequent Query Builder on Pivot

I have a three tables post(Model: Post), user(Model: User) and post_user_pivot for votes. The Schema of my pivot table Schema::create('post_user', function (Blueprint $table) { $table->id(); $table->enum('type', ['up', 'down'])->default('up'); $table->unsignedBigInteger('post_id'); $table->unsignedBigInteger('user_id'); $table->timestamps(); }); Storing the votes using attach along with the…

VIEW QUESTION
Back To Top
Search