another awesome video brother, a small request again, will you make a simple basic admin control panel for this API, which will run the basic crud operation. It will make this series complete. waiting for next video
@AtifNaseem5 жыл бұрын
Yes. After few videos there will be implementation of all in an app
@SHAJ.T3CH5 жыл бұрын
@@AtifNaseem that is great, waiting and waiting
@schoolbook14 жыл бұрын
Superb brother. Thumb up!
@AtifNaseem4 жыл бұрын
Thank you Mo Sababa
@debanjanroy74614 жыл бұрын
At 4:12 , the first filed I think iso not ios, the wrong filed name is giving error in LAMP.
@AtifNaseem4 жыл бұрын
you are right Debanjan Roy.
@chevalier56914 жыл бұрын
I am very thankful for this tutorial but please use more Laravel conventions, such as using index, show, store method in controller instead of countrySave etc.
@AtifNaseem4 жыл бұрын
Thank you, this is series, everything is applied in next videos.
@joegoodman43584 жыл бұрын
If you have this error: Unknown column 'updated_at' Just put this on CountryModel.php public $timestamps = false; Explanation: By default laravel will expect created_at & updated_at column in your table. By making it to false it will override the default setting.
@AtifNaseem4 жыл бұрын
Thanks Joe Goodman.
@tranphutho87333 жыл бұрын
Hi, which extension do you use to code in PHP for suggest
thank you... Please how do you know which url to use on postman
@AtifNaseem4 жыл бұрын
It is because I created the routes (urls). Please watch these videos in series and you will know.
@ridafakherlden46824 жыл бұрын
In the postman, you defined the URL as (learning/public/country) but in your api.php routes file you just defined the post route as (/country) how is that please I got confused at this part
@AtifNaseem4 жыл бұрын
all route will defined in api.php will be accessed [laravel]/public/api/etc
@hareeshs97735 жыл бұрын
Why did you use params instead of body to pass values in Post method? Params appends values in the url as in the Get method
@AtifNaseem5 жыл бұрын
I designed this course in series. So I decided to make similar steps.
@bushrafirdous80844 жыл бұрын
@Atif Naseem, i am getting following error while adding the records, I have added all the fillabels to model file. Illuminate\Database\Eloquent\MassAssignmentException: Add [country] to fillable property to allow mass assignment on [App\Models\CountryModel]. in file C:\Bushra\xampp\htdocs oshnisolar\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 331
@AtifNaseem4 жыл бұрын
Add country to the fillable array in your model CountryModel, to allow saving through create and massive methods protected $fillable = ['country'];
@swethavinoth6933 жыл бұрын
InvalidArgumentException: Auth guard [api] is not defined. in file C:\xampp\htdocs\learning\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php on line 84. I am getting this error
@AtifNaseem3 жыл бұрын
Have you followed from part 1?
@MarceloGracia5 жыл бұрын
Why is not used for the creation of controllers the -r parameter. eg: make:countrycontroller -r
@AtifNaseem5 жыл бұрын
This is a series and resource controller is covered here: kzbin.info/www/bejne/ZnSVaWmAoqZ4aZo where I covered what resource controllers are and why they are useful.
@sadianahar19744 жыл бұрын
when i'm using GET in postman it's showing all data but when i'm trying to Post it's showing " 419 | Page Expired". Sir , can you please tell me the reason?
@AtifNaseem4 жыл бұрын
The Session Expired or 419 Page Expired error message in larvel comes up because somewhere your csrf token verification fails. POST request requires CSRF token, include it while making post requests.
@medoune894 жыл бұрын
Hi sir, Can WE build api with query builder. Thank you
@AtifNaseem4 жыл бұрын
Yes, you can
@medoune894 жыл бұрын
@@AtifNaseem how ???
@vivekdas114 жыл бұрын
can not access api from localhost/appname/public/api/xyz , api getting 404 not found, but from 127.0.0.1 i can access, can you help me out ?
@AtifNaseem4 жыл бұрын
are you using php artisan serve ?
@vivekdas114 жыл бұрын
@@AtifNaseem with artisan serve everything works fine . from localhost it is not working properly can i contact you via mail or facebook ??
@ashique120095 жыл бұрын
Good tutorial but you did not share or show the handle of inserting record code, as it is in model file i hope. Is it possible to see those code in your github repo? Thanks
@AtifNaseem5 жыл бұрын
Have u watched the entire playlist?
@ashique120095 жыл бұрын
@@AtifNaseem hmm you are correct. In later session you have shown that.
@muzammilahmed92164 жыл бұрын
Assalam o Alaikum atif i am facing a problem that i downloaded postman.exe but it is not installng in pc it is showing some kind of error (the procedure entry point setDefaultDllDirectories could not be located in dynamic link library KERNEL32.dll) this is the error in parenthesis
@AtifNaseem4 жыл бұрын
Walaikum assalam. Muzammil this is some sort of windows error during installation.
@muzammilahmed92164 жыл бұрын
@@AtifNaseem thanks! any idea? how to resolve it
@AtifNaseem4 жыл бұрын
I have no idea. I am using windows 10 and never got any error during installation.
@kelinengambou46764 жыл бұрын
very wonderful tutorial but i have a probleme:The page has expired due to inactivity. Please refresh and try again
@AtifNaseem4 жыл бұрын
You can add javascript code to reload the page after defined period of time.
@vladdream984 жыл бұрын
If I forgot Where I created my routes how I can find that ? I am blocked at this step
@AtifNaseem4 жыл бұрын
You can check from route/web.php or execute this on terminal php artisan route:list
@munemshahariar25034 жыл бұрын
why do i get a 200 response ? in post method where i mentioned it to be 201 ? also even in post method i get GET method results in postman....i sharingan copied your codes too!!
@AtifNaseem4 жыл бұрын
The HTTP 200 OK success status response code indicates that the request has succeeded. The meaning of a success depends on the HTTP request method: GET : The resource has been fetched and is transmitted in the message body.
@munemshahariar25034 жыл бұрын
@@AtifNaseem the resource fetched was from the get method...not the post....thebother functions work..not just the post one...idk why
@mohammadalabd1895 жыл бұрын
Thanks, we just need to secure this api
@AtifNaseem5 жыл бұрын
My pleasure
@mikanosamikanosa60854 жыл бұрын
why i get 419 page expired?
@AtifNaseem4 жыл бұрын
If you are getting an error after submitting the form then you need to add the CSRF field in your form.
@mdriadulhasan57775 жыл бұрын
Why i found 500 internal server error
@AtifNaseem5 жыл бұрын
you may execute these in terminal and check 1) php artisan key:generate 2) php artisan cache:clear 3) php artisan config:clear
@aamirshayanshaikh27285 жыл бұрын
I don't know why I am getting following error however code according to video is fine I have verified twice. Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: The POST method is not supported for this route. Supported methods: GET, HEAD. in file C:\xampp\htdocs\laravel_tutorial\blog\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php on line 256
@AtifNaseem5 жыл бұрын
Check your route web.php file, is your route has get Method? Change It to post.
@aamirshayanshaikh27285 жыл бұрын
@@AtifNaseem Method is in post in api.php file. As you are defining all routes in api.php file. I haven touched web.php file and it has default code. Route::post('country', 'Country\CountryController@countrySave'); Kindly help me out this issue.
@AtifNaseem5 жыл бұрын
@@aamirshayanshaikh2728 Yes api.php I forgot that its api and not web
@aamirshayanshaikh27285 жыл бұрын
Atif Naseem i am still facing the problem
@AtifNaseem5 жыл бұрын
@@aamirshayanshaikh2728 Have you created middleware? If not then define like this example Route::middleware('auth:api')->post('/[yours]', function (Request $request) { return $request->user(); });
@balaraja74084 жыл бұрын
The server couldn't send a response: Ensure that the backend is working properly Self-signed SSL certificates are being blocked: Fix this by turning off 'SSL certificate verification' in Settings > General Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy Request timeout: Change request timeout in Settings > General
@balaraja74084 жыл бұрын
postman version is Version 7.16.0, laravel 5.5 - i got above error.
@AtifNaseem4 жыл бұрын
Fix this by following: Postman -> File (1st menu item) -> Settings -> SSL certificate verification OFF
@luckyboy93394 жыл бұрын
If you are facing 419 Error Page Expired. Go to App\Http\Middleware\VerifyCsrfToken.php and add to $except protected $except = [ 'country/*', ];