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...
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....
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;...
Halim Halim
7
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......
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
LiamA LiamA
0
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...
ToxifiedM ToxifiedM
16
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...
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') ])...
Church Renewal Church Renewal
0
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...
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...
I'm working on a project where I provide API services for the clients / consumers. In my APIs with storing or updating, I validate input data with the Laravel Validator. By default, when validation exception is thrown, it responds with a JSON format...
Poseiden Poseiden
6
Hi all, I'm wondering how other people diagnose MaxAttemptsExceededException errors because it's something I've always struggled with. The main problem being the lack of information, I'm wondering if there is a way to find out for example: A job has...
retaxmaster retaxmaster
4
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...
COUPDEGRACES COUPDEGRACES
8
Previously I apologized with the title because I didn't know what the name of the problem was. I did a loop on the image in my post, initially it was safe but there was a problem when I made the same title as the previous post, the image that appeare...
axxel axxel
4
I have an existing laravel 8 application which does not handle AJAX requests: its views show data that is subject to pretty frequent changes, but the only way to see the most recent data is to refresh the page. I'd want to add some API endpoints to w...
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}...
top2203 top2203
2
I get issue when using nginx config with proxy pass and laravel paginator In localhost, anything is correct, But on my production env, I am using nginx config with proxy pass param server { ...... location / { proxy_pass http://localhost:70...
LadyDeathKZN LadyDeathKZN
1
Hi everyone, would someone be willing to help me convert this code into Laravel? I have changed the few things I do recognize but the prepare and bind_params are not working/ I have managed to get it to the point of the bind_params then nothing works...
justustheis justustheis
5
I have an issue with dompdf and queued jobs. Any help on this topic is very welcome :) When exporting a resource to pdf synchronously everything works as expected. As soon as I queue the job the following code doesn't work anymore and breaks the layo...
YuraLons YuraLons
0
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...
anybody can point me in right direction to implement frontend and laravel php code for making searchbar like laracasts website?...
deansatch deansatch
6
Does anyone know why an api call to Azure would take 20 seconds to return a response on homestead but when I push to production server it is almost instant?...
msslgomez msslgomez
1
I hate doing stuff on the company server, I'm trying to setup some jobs and run the queue and from what I read I need Supervisor but I have no idea how to actually set it up. I'm ssh into the server and am in this folder /public_html/project and I tr...
vincej vincej
1
I have no idea what this does. You can press / till the second coming and it appears to do nothing. What gives?...
Church Renewal Church Renewal
0
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...
toto5931 toto5931
3
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...
Create a New Discussion Button