Questions tagged [laravel-controller]

218 questions
1
vote
0 answers

Laravel | Redirect Does Not Change URL

I am using an API from a payments-provider. At some point, I show the user a page where he can authenticate himself (enter a code that the payment-provider will send him). Note that on this page, I render a div element that the payment-provider has…
padawanTony
  • 1,348
  • 2
  • 22
  • 41
1
vote
1 answer

Redirecting To Controller Actions with POST method in laravel 6

I have an action named destroy in UserController I don't wanna work this action instead of UserInfoController@destroy supposed to run. So I need to redirect to the UserInfoControlle@destroy controller. UserController@destroy action; return…
ORHAN ERDAY
  • 1,020
  • 8
  • 31
1
vote
2 answers

Laravel 5.8 JWT API Login a user only if his status is active

i am trying to implement if your trying to login in with his credentials that time login system check the account status if status ACTIVE it login else it show error notification your account has blocked. my database column name and its value column…
user12380208
  • 519
  • 7
  • 26
1
vote
1 answer

How to generate thumbnail from PDF upload in laravel

I am trying to generate a thumbnail of the PDF I upload in laravel the thumbnail should be the first page of the PDF. Right now I am manually uploading an image to make the thumbnail like this: if (request()->has('pdf')) { $pdfuploaded =…
Riwaj Chalise
  • 637
  • 1
  • 13
  • 27
1
vote
1 answer

How to get sum of specific status or id and joining 3 table in laravel

my table table1 |table1_id | name | | 1 john | | 2 dave | | 3 carl | table2 |table2_id| table1_id| type |status | 1 | 1 | shoes |paid | 2 | 1 | bag |paid | 3 | 2 | bag |paid | 4 …
azakura
  • 27
  • 8
1
vote
2 answers

How to pass a collection or array from blade file to controller in laravel?

$cartItems contains all the rows of products from database and I am using this inside a blade file. I want to pass this $cartItems back to a controller from this blade file Note: $cartItems is from index() function in a controller like…
Backstreet Imrul
  • 102
  • 2
  • 15
1
vote
2 answers

Laravel: Passing a class name from a Controller to a Job

I'm trying to pass a certain class name from the controller to a job file through Job::dispatch($className); I've tried passing it as a string and passing it as a ClassName::class but none of these methods work The code in the Job file looks…
1
vote
1 answer

How to pass data from routes group to its controllers?

I have a routes group in Laravel that gets a parameter like below: Route::group(['prefix' => '{ProjectCode}'], function () { Route::get('/categories', 'CategoriesController@Categories'); Route::get('/add-category',…
Meraj
  • 35
  • 5
1
vote
1 answer

How can i show database list for current user with laravel passport on controller

i have a laravel app that uses laravel passport and vue.js for the front-end. Currently when i show a list from the database it shows all the elements of the table and i want it to show me only the data from the current user I've seen that this…
1
vote
1 answer

How can I combine both of these conditions? in laravel

I'am new with laravel. How can I combine both of these conditions? public function student($classroom_id) { $members = Classroom::findOrFail($classroom_id,)->members->load('role'); $members = User::where([ ['role_id',…
1
vote
4 answers

How to update data in Laravel controller?

I am trying to update my template details in the controller. But currently, my code is not working. It is not updating the fields. Anyhow if I add $template->save(). It saves the updated record as a new record. How to make my current code work? Why…
anonymus
  • 161
  • 4
  • 12
1
vote
0 answers

Laravel is loading the wrong file

I have my own server where I host the app while we work on it. The client has FTP access to the server. There is a controller called CarDetailsController.php. My client wanted to make some changed to the file, so he copies the file in the same…
Bojan
  • 83
  • 9
1
vote
2 answers

pass parameters/data in hyperlink - laravel blade

I am trying to pass data from one page to another via hyperlink. Here is url. click here My Route:- Route::get('page-name/{sometext}', 'MyController@pagename'); In Controller:- function pagename(Request…
1
vote
1 answer

Laravel - Error ResetPasswordController not found in route list

I have this error while execute the command php artisan route:list : ReflectionException : Class App\Http\Controllers\Auth\ResetPasswordController does not exist at…
enfix
  • 6,680
  • 12
  • 55
  • 80
1
vote
2 answers

Custom function inside controller not found

I created a controller with resource. I made a custom function inside it however when I use it as a route in my blade.php it says that it is not defined. Any help with the error and explanation about it is highly appreciated!! Blade
1 2
3
14 15