toto5931 toto5931
4
My laravel project is served by Docker, with Laravel Sail. How can I debug it in VScode? My set up: windows with Docker desktop as explained here https://laravel.com/docs/8.x#getting-started-on-windows I have no particular knowledge of Linux and Dock...
Hi, I've been tearing my hair out for more than a day on an SQL query that I can't formulate with Eloquent ... It's dramatic. When I write this : $categories = DB::select(DB::raw(" SELECT categories.*, FLOOR(count(*) * 100 / {$nbFollowers}...
Yoh replied
Solved
I need to know the best way to define relations and indexes, Are there any difference between $table->unsignedBigInteger('example_id')->index(); OR ‚Äč$table->index(['example_id']);...
ToxifiedM ToxifiedM
18
I am trying to create an endpoint and send the data to then endpoint and requesting it later within the controller method. As the input value changes, it fires axios put method and pass the updated perPage data to an endpoint, I am getting a successf...
brayniverse brayniverse
1416
I'm wondering how far Laravel's reach extends to. I hail from London myself....
Hi there, I don't really know how to show the records that are only created today... Can someone help please? So I have a list of children and each child has a checkin and checkout, what I would like is to show only the checkins and checkouts that ar...
Fajar Fajar
12
Why when I press the absent button nothing happens, what's wrong with this @foreach($siswas as $siswa) <form action="{{route('simpan-data.absensi-siswa')}}" method="post">...
YuraLons YuraLons
3
There is a code like this, which is located in public function store() { // #code if ($request->hasFile('passport')) { foreach($request->file('passport') as $index => $passport){ $name = ($request->pa...
Church Renewal Church Renewal
1
My project has .env .dev file that with things like the AWS S3 key and APP_KEY left intentionally blank. The idea is you clone the project, make a copy of .env .dev and name it .env, then fill in what you need. Problem is when I use Sail, it seems t...
Church Renewal Church Renewal
1
Is it possible to choose a different version of Node or NPM when building a project with Sail? I know you can choose different versions of PHP with: # PHP 8 .0 context: ./vendor/laravel/sail/runtimes/8 .0 # PHP 7 .4 context: ./vendor/laravel/sail/r...
david19 david19
1
Hello Team. In your "config.app" file, you can enable or disable your service provider. This is enabled: App\Providers\MyNewServiceProvider::class, This is disabled: //App\Providers\MyNewServiceProvider::class, How i can check in a blade...
Reprogammer Reprogammer
2
I recently updated from Laravel 7>8, but my project is using the 7 version. Every now and then I encounter this error "Unknown named parameter" every time I open routes that have/require parameters. I am pretty sure it's because of the u...
horizens horizens
6
I'm building a site that includes the ability for Users to create playlists of tracks. I'm having a little trouble figuring out how to save a track position in a playlist when using a pivot table. Schema::create('playlists', function(Blueprint $tabl...
retaxmaster retaxmaster
5
I've got a Factory definition like this: public function definition() { $to = $this->faker->numberBetween(1, 3); return [ "ad_id" => $to == 1 ? Ad::all()->random()->id : null, "d...
Is there a way that when I fire my livewire click event that I can also toggle a alpinejs variable?...
LiamA LiamA
1
I'm building a shopping cart SPA using Laravel and Vue. Vue communicates with Laravel via the API, which is not a stateless as I'm using Sanctum for a cookie based session authentication services. For guest users I want to store the cart info in a c...
AbdulBazith AbdulBazith
11
guys working with online examination project. simultaneously 3000 students will write the exam. till yesterday the application worked fine. but today when student try to login they face this issue 419|page expired why this happens?? this is my rout...
Halim Halim
8
I think the .env file was created to let users custom there local environment, Is using this file in prod a good practice? is there a risk? if yes what is the best ways to protect it against direct access, maybe search engine......
nikankad nikankad
4
i am using the spatie role manager with laravel v7, i am using a factory to generate dummy data. how do i give a role to the generated data when i create it? my factory $factory->define(User::class, function (Faker $faker) { return [ '...
jlrdw replied
Solved
COUPDEGRACES COUPDEGRACES
2
I have ListCategory , in Category model i code like this, public function getRouteKeyName() { return 'slug'; } } in route web.php Route::get('/list-loker/{$category}', '[email protected]_category')->name('job_category'); T...
I have a table called EventNotifications and I'm returning all notifications associated to a users current team. I want to restrict the results coming back to only EventNotifications that don't have a relational entry in EventNotificationDismissal....
twg_ replied
Solved
hjortur17 hjortur17
14
Any ideas how I can get VUE to return the price I'm calculating instead of Promise Here is the code: price: async function () { let priceForDays = 0; let finalPrice = 0; let prices = await axios.get('/api/prices/get/' + this.booking.luggage...
Wakanda Wakanda
5
How to trace insecure state management on the server side?...
floryan floryan
3
How to get job ID after dispatching? Right now I do it like this: public function store(UploadFeedRequest $request) { UploadFeedJob::dispatch($request->validated()); $jobId = DB::table('jobs')->latest()->get()->first()->id;...
Jakub003 Jakub003
2
This is probably a huge newb question, but I can't seem to find any tutorials or examples for how to write out the livewire public function to make the group thing work. Any links to a guide would be much appreciated as well :) In this documentation...
msslgomez msslgomez
2
I have some Jobs that create files but after dispatching the jobs, the entries are saved to the db but then they don't run or execute without a php artisan queue:work manual command. The idea for this is to set it on a server and me not having to run...
andyg1 andyg1
13
I thought I'd follow the docs to get Laravel up and running with Sail. At the point in the docs where it says: curl -s https://laravel.build/example-app | bash I received the message in the terminal "Docker is not running" This is my first...
msslgomez msslgomez
19
I'm trying to create a new folder inside a public disk but I'm having issues. This is what I have so far while (Storage::disk('report_upload')->exists($name . '.xlsx')) { $name .= $counter; $counter++; Storage...
boyjarv boyjarv
14
here is my object { "title": "new artx", "description": "Here is a new piecexx", "status": "2", "primary_art": "https://drsustainable.files.wordpress.com/2012/...
ozgunlu ozgunlu
22
namespace App; use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; class UserInformation extends Model { /** * The table associated with the model. * * @var string */ protected $table = "user_information&qu...
iurry replied
Solved
lordisp lordisp
1
I like to build a toggle component where I can dynamically change the variables via a property: <x-toggle :toggle="my_x_toggle" wire:click="doSomething"/> the property toggle with it's value my_x_toggle shall replace the hi...
Jean_ali Jean_ali
0
I'm using vue-i18n with inertia; I pass language locale from inertia middleware: HandleInertiaRequests.php public function share(Request $request) { return array_merge(parent::share($request), [ 'local' => config('app.locale') ])...
rafaeladi rafaeladi
1
So currently ive been working on a project and this is one of the problem that i had. I want to have this data in my application and want the data to be viewed as a progressbar in my view. I want the data to be like this | CaseName | Duration | Verd...
YuraLons YuraLons
8
How do I correctly add fields from a post form to other tables? I have a post table containing records, it is necessary to specify data in 4 other tables (store1, store2, store3, store4). I thought I should do it this way: [email protected] functi...
Hello all, I have a website which was written in Laravel 5. I found malicious files in folders: public_html and mylaravelproject\public. I'm not sure how this happened because I don't use upload file functionality anywere. Anyway, I restored this fol...
Create a New Discussion Button