ahangarha ahangarha
1
I used nullable|accepted for some of my checkbox validation fields. But it seems accepted rule, override nullable and forces the validation to be passed only and only if the given value is "yes", "on", 1, or true. Am I missing som...
www888 www888
12
Hi Uisng FilePond <input id="photos" name="image[]" type="file"multipledata-allow-reorder="true"data-max-file-size="3MB"data-max-files="3"> <script> FilePond.registerPlugin...
I did update my existing project on plesk server and getting this error. same project working fine at local server in my PC...
mohsinaliryk mohsinaliryk
3
I want to send notification to users according to their selected locale. I'm using markdown templates. I've tried to set prefer locale like following. But it is not working. public function preferredLocale() { return $this->locale; }...
dredgos dredgos
1
Hi, I am looking at how to build a tournament generator in Laravel, which will then have an API and hook up to a front-end built in something else. Currently i have a working version for a single tournament using react/redux (it randomises, then gene...
Hello, I am trying to build a very simple API and for the response format I want to follow the JSend specification https://github.com/omniti-labs/jsend. Basically what I want to do is add a status property to every response. So far I have been able t...
croftCoder croftCoder
4
referencing this discussion, https://laracasts.com/discuss/channels/general-discussion/how-to-get-related-items-from-a-many-to-many-polymorphic-relationship is it possible to make the $relatedPosts a model relationship such that it's automatically lo...
Fajar Fajar
5
draw schedules based on logins with data conditions like this schedules mapel_id user_id room_id hours_start hours_end rooms name keahlian if I use the code below Room::with('schedules')->get(); Where do I put the user_id in scheludes and i tr...
MrMooky MrMooky
2
I'm aware that there are many packages out there that "support" 2FA for Laravel. But some of them are outdated, seem insecure or are only available for Google Authenticator. Via Medium I found the Package Laraguard and was excited to implem...
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...
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...
ApexLeo ApexLeo
0
Hello Everyone. I am using laravel cashier for payments. and i have implemented it on web side here is what it looks like public function payment(Request $request) { $intent = auth()->user()->createSetupIntent(); return view('page.payment', c...
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">...
warpig warpig
6
Hey guys, so this is part of a search modal where there's only 1 input field text, and depending on what the user types in the search bar, one of these urls will become true, at this time I don't know if it's bad practice to have so many of these and...
lutkabe lutkabe
2
Hi everyone, In my project the php artisan migrate is supposed to target a mysql database but it throws the following exception: PDOException::("could not find driver"). I used Tinker and all env settings are correct except the env('DATABA...
kwcham kwcham
1
I got this "This password reset token is invalid." error when creating the password reset feature using Laravel 8. The problem is the token sent by email is not matched with the token stored in database table. I used below code to check the...
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...
ToxifiedM ToxifiedM
1
I am currently storing perPage data in the sessions and partially loading the data based on the perPage value selected. The problem is, I have set my prop type as number, but when the perPage data is being stored in the sessions, it is being stored a...
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...
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...
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...
Wakanda Wakanda
5
How to trace insecure state management on the server side?...
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...
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') ])...
Create a New Discussion Button