Add a Record - RESTful API with Laravel - 03

  Рет қаралды 34,653

Atif Naseem

Atif Naseem

Күн бұрын

Пікірлер: 79
@GhulamMustafa-mx3pq
@GhulamMustafa-mx3pq 4 жыл бұрын
Awesome tutorial ever
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Glad you liked it
@mdzakerhossain8858
@mdzakerhossain8858 4 жыл бұрын
Very Easy and helpfull
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Thanks for liking
@raymondpang6707
@raymondpang6707 5 жыл бұрын
well done guy , very clear desc and Implements
@AtifNaseem
@AtifNaseem 5 жыл бұрын
My pleasure. Don't forget to like : )
@tothebone4613
@tothebone4613 5 жыл бұрын
this is what i need thank you :)
@AtifNaseem
@AtifNaseem 5 жыл бұрын
My pleasure. Don't forget to like : )
@SHAJ.T3CH
@SHAJ.T3CH 5 жыл бұрын
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
@AtifNaseem
@AtifNaseem 5 жыл бұрын
Yes. After few videos there will be implementation of all in an app
@SHAJ.T3CH
@SHAJ.T3CH 5 жыл бұрын
@@AtifNaseem that is great, waiting and waiting
@schoolbook1
@schoolbook1 4 жыл бұрын
Superb brother. Thumb up!
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Thank you Mo Sababa
@debanjanroy7461
@debanjanroy7461 4 жыл бұрын
At 4:12 , the first filed I think iso not ios, the wrong filed name is giving error in LAMP.
@AtifNaseem
@AtifNaseem 4 жыл бұрын
you are right Debanjan Roy.
@chevalier5691
@chevalier5691 4 жыл бұрын
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.
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Thank you, this is series, everything is applied in next videos.
@joegoodman4358
@joegoodman4358 4 жыл бұрын
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.
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Thanks Joe Goodman.
@tranphutho8733
@tranphutho8733 3 жыл бұрын
Hi, which extension do you use to code in PHP for suggest
@AtifNaseem
@AtifNaseem 3 жыл бұрын
marketplace.visualstudio.com/items?itemName=onecentlin.laravel-blade marketplace.visualstudio.com/items?itemName=onecentlin.laravel5-snippets marketplace.visualstudio.com/items?itemName=ryannaddy.laravel-artisan marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense marketplace.visualstudio.com/items?itemName=stef-k.laravel-goto-controller marketplace.visualstudio.com/items?itemName=codingyu.laravel-goto-view marketplace.visualstudio.com/items?itemName=mikestead.dotenv
@obentabiayuk4780
@obentabiayuk4780 4 жыл бұрын
thank you... Please how do you know which url to use on postman
@AtifNaseem
@AtifNaseem 4 жыл бұрын
It is because I created the routes (urls). Please watch these videos in series and you will know.
@ridafakherlden4682
@ridafakherlden4682 4 жыл бұрын
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
@AtifNaseem
@AtifNaseem 4 жыл бұрын
all route will defined in api.php will be accessed [laravel]/public/api/etc
@hareeshs9773
@hareeshs9773 5 жыл бұрын
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
@AtifNaseem
@AtifNaseem 5 жыл бұрын
I designed this course in series. So I decided to make similar steps.
@bushrafirdous8084
@bushrafirdous8084 4 жыл бұрын
@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
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Add country to the fillable array in your model CountryModel, to allow saving through create and massive methods protected $fillable = ['country'];
@swethavinoth693
@swethavinoth693 3 жыл бұрын
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
@AtifNaseem
@AtifNaseem 3 жыл бұрын
Have you followed from part 1?
@MarceloGracia
@MarceloGracia 5 жыл бұрын
Why is not used for the creation of controllers the -r parameter. eg: make:countrycontroller -r
@AtifNaseem
@AtifNaseem 5 жыл бұрын
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.
@sadianahar1974
@sadianahar1974 4 жыл бұрын
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?
@AtifNaseem
@AtifNaseem 4 жыл бұрын
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.
@medoune89
@medoune89 4 жыл бұрын
Hi sir, Can WE build api with query builder. Thank you
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Yes, you can
@medoune89
@medoune89 4 жыл бұрын
@@AtifNaseem how ???
@vivekdas11
@vivekdas11 4 жыл бұрын
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 ?
@AtifNaseem
@AtifNaseem 4 жыл бұрын
are you using php artisan serve ?
@vivekdas11
@vivekdas11 4 жыл бұрын
@@AtifNaseem with artisan serve everything works fine . from localhost it is not working properly can i contact you via mail or facebook ??
@ashique12009
@ashique12009 5 жыл бұрын
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
@AtifNaseem
@AtifNaseem 5 жыл бұрын
Have u watched the entire playlist?
@ashique12009
@ashique12009 5 жыл бұрын
@@AtifNaseem hmm you are correct. In later session you have shown that.
@muzammilahmed9216
@muzammilahmed9216 4 жыл бұрын
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
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Walaikum assalam. Muzammil this is some sort of windows error during installation.
@muzammilahmed9216
@muzammilahmed9216 4 жыл бұрын
@@AtifNaseem thanks! any idea? how to resolve it
@AtifNaseem
@AtifNaseem 4 жыл бұрын
I have no idea. I am using windows 10 and never got any error during installation.
@kelinengambou4676
@kelinengambou4676 4 жыл бұрын
very wonderful tutorial but i have a probleme:The page has expired due to inactivity. Please refresh and try again
@AtifNaseem
@AtifNaseem 4 жыл бұрын
You can add javascript code to reload the page after defined period of time.
@vladdream98
@vladdream98 4 жыл бұрын
If I forgot Where I created my routes how I can find that ? I am blocked at this step
@AtifNaseem
@AtifNaseem 4 жыл бұрын
You can check from route/web.php or execute this on terminal php artisan route:list
@munemshahariar2503
@munemshahariar2503 4 жыл бұрын
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!!
@AtifNaseem
@AtifNaseem 4 жыл бұрын
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.
@munemshahariar2503
@munemshahariar2503 4 жыл бұрын
@@AtifNaseem the resource fetched was from the get method...not the post....thebother functions work..not just the post one...idk why
@mohammadalabd189
@mohammadalabd189 5 жыл бұрын
Thanks, we just need to secure this api
@AtifNaseem
@AtifNaseem 5 жыл бұрын
My pleasure
@mikanosamikanosa6085
@mikanosamikanosa6085 4 жыл бұрын
why i get 419 page expired?
@AtifNaseem
@AtifNaseem 4 жыл бұрын
If you are getting an error after submitting the form then you need to add the CSRF field in your form.
@mdriadulhasan5777
@mdriadulhasan5777 5 жыл бұрын
Why i found 500 internal server error
@AtifNaseem
@AtifNaseem 5 жыл бұрын
you may execute these in terminal and check 1) php artisan key:generate 2) php artisan cache:clear 3) php artisan config:clear
@aamirshayanshaikh2728
@aamirshayanshaikh2728 5 жыл бұрын
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
@AtifNaseem
@AtifNaseem 5 жыл бұрын
Check your route web.php file, is your route has get Method? Change It to post.
@aamirshayanshaikh2728
@aamirshayanshaikh2728 5 жыл бұрын
​@@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.
@AtifNaseem
@AtifNaseem 5 жыл бұрын
@@aamirshayanshaikh2728 Yes api.php I forgot that its api and not web
@aamirshayanshaikh2728
@aamirshayanshaikh2728 5 жыл бұрын
Atif Naseem i am still facing the problem
@AtifNaseem
@AtifNaseem 5 жыл бұрын
​@@aamirshayanshaikh2728 Have you created middleware? If not then define like this example Route::middleware('auth:api')->post('/[yours]', function (Request $request) { return $request->user(); });
@balaraja7408
@balaraja7408 4 жыл бұрын
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
@balaraja7408
@balaraja7408 4 жыл бұрын
postman version is Version 7.16.0, laravel 5.5 - i got above error.
@AtifNaseem
@AtifNaseem 4 жыл бұрын
Fix this by following: Postman -> File (1st menu item) -> Settings -> SSL certificate verification OFF
@luckyboy9339
@luckyboy9339 4 жыл бұрын
If you are facing 419 Error Page Expired. Go to App\Http\Middleware\VerifyCsrfToken.php and add to $except protected $except = [ 'country/*', ];
@AtifNaseem
@AtifNaseem 3 жыл бұрын
Thanks Lucky Boy
@jorgeleon9212
@jorgeleon9212 4 жыл бұрын
si jala
@AtifNaseem
@AtifNaseem 4 жыл бұрын
si jala ?
Edit and Delete a Record - RESTful API with Laravel - 04
4:51
Atif Naseem
Рет қаралды 24 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Laravel 6 Beginner - e9 - RESTful Controllers Part 1
18:09
Coder's Tape
Рет қаралды 36 М.
Validation - RESTful API with Laravel - 05
9:10
Atif Naseem
Рет қаралды 25 М.
Inertia 2.0: It's like Next but better (and you can use React!)
19:02
Theo - t3․gg
Рет қаралды 56 М.
Token Authentication - RESTful API with Laravel - 07
6:43
Atif Naseem
Рет қаралды 84 М.
7 Лет Опыта в IT | Что я Понял?
19:56
Vlad Mishustin
Рет қаралды 253 М.
Setup - RESTful API with Laravel - 01
6:26
Atif Naseem
Рет қаралды 113 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 301 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН