Whenever I try to only save profile changes for the profile description and url in the edit form, I get an error because I didn’t choose an image file also. I would like to be able to update a profile with current image when an image file is not chosen in the edit form. The error I keep getting is:
Tag: laravel-8
Feature test for HTTP RESTful API on Laravel 8
I’m trying to write a feature test in RESTful API that I have been created in laravel 8. I have ChatController that gets user chats by getUserChats method: that called by this route: this is my feature test on this route: the test runs successfully by this green output OK (1 test, 3 assertions) but I don’t know this is
Laravel 8: Method IlluminateDatabaseEloquentCollection::update does not exist ERROR
I want to update some data from the DB, so I added this Controller method: Now the problem is I get this error: So how to solve this issue? Answer You are already resolving $anss using route-model binding. You are trying to call findOrFail with a model as an argument, which since Model implements Arrayable will return a Collection, thus
Laravel 8: Argument 2 passed must be an instance of
I’m working with Laravel 8 to develop an Online Forum. And I made this form for updating an answer of a user: And here is the route for this: And this is also the Method of QuestionController: But now the problem is, whenever I submit the form in order to update answer, I get this as error: Argument 2 passed
In Laravel Pagination how to add first page and last page?
In Laravel 8 pagination how to show less number of pages and also how to add “First Page” and “Last Page” Now in Laravel when we have more data, it will show the pagination like this: But I want my pagination to be like the images given below: Or Answer To customizing the pagination view, run below command in console
Laravel 8: Trying to get property ‘name’ of non-object error
I’m working with Laravel 8 to develop my Forum project. So I created a table called answers, and here is the Migration for that: And then in order to make relation between Question Model & Answer Model, I added these: Question.php: User.php: After that, I added this for showing the question information: But now I get this error: ErrorException Trying
Using stacks in Laravel 8
I’m building a site using Laravel 8 and Jetstream. Jetstream is opinionated about the javascript / css framework, which is great, but I’m needing to add an external javascript library to one of my components, and I don’t see anywhere to add them in the default app layout. So I added a stack for the css /js like this in
How to combine two counts using Laravel
Using Laravel 8 for a restful API. A table in the database has following fields report_date , supervisor_id and supervisor_note I want to retrieve a result that counts the number of reports on any given day date and also counts all of the null values in supervisor_notes field. I am using the following Laravel code: I don’t know how to
How to use UUID instead of a slug for ticket
I am currently navigating to a ticket using the slug set by the title example blah-blah-blah and want to use uuid instead of 336c64de-5dcb-34bc-9511-a48242b9zzzb. What is the best approach to take for Laravel 8? I am using Laravel Jetstream with Livewire stack. Current model code Ticket Migration Answer add uuid in migration if you want to use uuid for foreign
laravel breeze Multi Auth – Admin Guard with two diffirent registration
I’m using laravel breeze as auth scaffolding package.I want to create Multiple Authentication using laravel guards for two different registration form for two User Types (Admin, User). The Main Idea of what I want to achieve : I have two tables in the database one for admins and another for users what I want to achieve is if the admins