Category : laravel

I want to get all of route and register to fake.php file like this: $getRouteCollection = Route::getRoutes(); //get and returns all returns route collection foreach ($getRouteCollection as $route) { Route::{‘fake/’ . $route->methods()[0]}($route->uri, [$route->getController(), $route->function()]); } i need to add prefix to all of route, and all routes work like before. Sourc..

Read more

I have freshly created laravel application which i am trying to connect to remote database but i’m getting an error. SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = tomsin1 and table_name = migrations and table_type = ‘BASE TABLE’) My .env file DB_CONNECTION=mysql DB_HOST=stud.if.ktu.lt DB_DATABASE=tomsin1 DB_USERNAME=tomsin1 DB_PASSWORD=ooShen4ooPaechad Source: ..

Read more

I would like to integrate stripe to my laravel 8 project. But the composer always removes fideloper during the installation process (composer require stripe/stripe-php). And this leads to an erro: In Application.php line 735: Class FideloperProxyTrustedProxyServiceProvider" not found when trying to start laravel. What could I do? Sourc..

Read more

Hi im trying figure out how to display message(toastr) after successful registration, im using laravel 8 with jetstream authetication, so far i couldnt find anything useful on google… by the way im in RegistredUserController.php public function store(Request $request, CreatesNewUsers $creator): RegisterResponse { event(new Registered($user = $creator->create($request->all()))); $this->guard->login($user); return app(RegisterResponse::class); } i tried modifying this block ..

Read more

I’m trying to get the selected value to return the correct item but I think the foreach is messing it up, I can’t thing of a way to get around it. My View <div class="images"> @foreach($images as $image) <div class="images-container"> <form method="POST" action="{{route(‘gallery.destroy’, $image->id)}}"> @csrf @method("DELETE") <button onclick="return confirm(‘Are you sure?’)" type="submit"><i class="fas fa-trash"></i></button> </form> ..

Read more

i want to set amount using javascript variable. here is what i’m doing, $.ajax({ url: "{{url(‘myurl’)}}", data: data, cache: false, processData: false, contentType: false, type: ‘POST’, success: function (result) { var amt = result; console.log(amt); var options = { "key": "KEY", "amount": amt, "currency": "INR", "name": "Test Name", "description": "Test Transaction", "image": "", "order_id":"Order1" , ..

Read more