skip to Main Content

Test multi storage in laravel

I have a issue while trying to mock multi Storage in laravel test enviromnment. Here is my my code: public function sftp ( Sibling $sibling ) { $file_paths = Storage::build($sibling->config) ->files($this->track->track_token); Storage::disk('public') ->makeDirectory($this->track->track_token); foreach ( $file_paths as $file_path ) {…

VIEW QUESTION

Laravel Ordering on Piviot table

public function get_user_documents() { $userId = Auth::id(); $user_documents = UserDocument::where('user_id', $userId) ->orWhereHas('share_documents', function ($query) use ($userId) { $query->where('users.id', $userId); }) ->with(['share_documents' => function ($query) use ($userId) { $query->where('users.id', $userId); }]) ->latest() ->get(); // $user_documents = $user_documents->map(function ($document) use ($userId) {…

VIEW QUESTION

Laravel migration to change an unsignedMediumInteger column

I have a need to create a migration that changes an existing 'unsignedMediumInteger' column to nullable(). I have the following in my migration: <?php use IlluminateDatabaseMigrationsMigration; use IlluminateDatabaseSchemaBlueprint; use IlluminateSupportFacadesSchema; use AppNewModelsSubscriptionType; return new class extends Migration { public function…

VIEW QUESTION
Back To Top
Search