Questions tagged [laravel-request]

Laravel Requests - handling request and Request validation

218 questions
0
votes
1 answer

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.store' doesn't exist

When I try to save data from laravel form to a database table I am getting the following exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.store' doesn't exist (SQL: select count(*) as aggregate from store where name =…
0
votes
1 answer

Laravel request URI not working

I have the following route group: Route::group(['prefix' => 'admin'], function () { Route::get('/', 'PagesController@index'); // some more routes... }); In my layout file I have the following condition: @if (Request::is('admin/*')) …
adam78
  • 9,668
  • 24
  • 96
  • 207
0
votes
1 answer

laravel 5 how to pass data to a name route from a view?

generally my aim is to pass a data that will serve as identifier in an href attribute.. my route is somethign like this. Route::bind('video', function($slug){ return DB::table('videos') ->select('slug') ->where('slug',…
johnguild
  • 435
  • 1
  • 5
  • 25
0
votes
1 answer

Multiple steps registration Form => Multiple Requests? (Laravel)

I am building a multiple steps registration form. I will only allow the user to progress to next step when the current step is fully validated. I will also store all the information in the session and when I have everything I will persist it to the…
Cristian
  • 2,390
  • 6
  • 27
  • 40
0
votes
1 answer

Laravel Socialite Request Returns Null

I'm using Laravel Socialite 5.0. execute($request->has('code')); } $request->has('code') always returns…
0
votes
1 answer

Laravel 5.1 Date_Format Validator Fails on Y-m-d Format

I'm starting to use Request objects to validate incoming post data, and I've seen examples of how others are using date_format, but I can't seem to get dates to pass even though I'm using a format that passes when you use PHP's…
mtpultz
  • 17,267
  • 22
  • 122
  • 201
0
votes
1 answer

When updating a row, how do I validate that the existing row contains a value with Laravel form requests?

In Laravel 5, using a form request to act as a validation gate, and given the code below: Controller public function decline(Request $request, InviteDeclineRequest $validation, $id) { $invite = Invite::find($id); $invite->status =…
Chris
  • 54,599
  • 30
  • 149
  • 186
0
votes
1 answer

Validate a field globaly at laravel 5

Let's say we have a same field in almost all tables with same rules for validation, for example something like slug, is it possible to create a rule to handle validation for all requests with the slug field?
Ravexina
  • 2,406
  • 2
  • 25
  • 41
0
votes
2 answers

Laravel 5 Request Class

In Laracasts, specifically Laravel 5 Fundamentals, Jeffrey mentioned about using the same Request Class for creating and updating a model. I have tried this but am getting an error: here is my RequestClass
Richie
  • 1,398
  • 1
  • 19
  • 36
0
votes
1 answer

laravel didn't identify ajax request

I tried sending login post method with ajax and in the controller method I have something like if(Request::ajax()){ return 'success'; }else{ return 'false'; } every time i send ajax request with my html page it returns false instead…
Mahesh Thapa
  • 141
  • 1
  • 2
  • 10
-1
votes
1 answer
-1
votes
1 answer

Replace content of request laravel

I want to replace the content inside a request of Laravel. How can I do that? To replace the content and save inside the same request?
D.Joe
  • 19
  • 3
-1
votes
1 answer

Change return View to return Route on laravel search function

I am trying to correct my code of the searchresult function of my controller so my concern is that when I paginate the search result or make form validation, I get the following error message : The GET method is not supported for this route.…
-1
votes
1 answer

"Call to a member function send() on strin" error appear when my middleware run on laravel

I want to make a middleware to redirect all my requests to 'dashboard' route if my database is empty, but this error appears on page. public function handle(Request $request, Closure $next) { $wallets = Wallet::get()->count(); echo…
-1
votes
1 answer

How to get All input bottom of POST in Laravel 7

I have this form in Laravel:
{{csrf_field()}}
Farshid
  • 11
  • 5
1 2 3
14
15