{"id":6960,"date":"2021-08-05T11:29:18","date_gmt":"2021-08-05T11:29:18","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=6960"},"modified":"2022-04-13T16:33:34","modified_gmt":"2022-04-13T16:33:34","slug":"in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/","title":{"rendered":"In this tutorial I&#8217;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\" id=\"56b4\">Lets go to download project and set up to<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">composer create-project laravel\/laravel form \"5.8.*\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"77ca\">Next go to .env file and put your database name -&gt; form<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">DB_CONNECTION=mysql<br>DB_HOST=127.0.0.1<br>DB_PORT=3306<br>DB_DATABASE=form<br>DB_USERNAME=root<br>DB_PASSWORD=<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"9441\">Next step create database in&nbsp;<a href=\"http:\/\/localhost\/phpmyadmin\/server_databases.php?server=1&amp;db=&amp;table=\">PhpMyAdmin<\/a>&nbsp;Database name \ud83d\udc47<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">form<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*7YwaCOCKCrxmGwseHNy0NA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"5ad2\">Now migrate the table run this command \ud83d\udc47<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php artisan migrate<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*X1ka2BrwAc1fLx4sUACWZg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"194a\">Table has been migrated successfully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"7a32\">let\u2019s go to create model, migration and controller in one command copy below code and paste in your terminal.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php artisan make:model product -mcr<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*9aEuGihvoqlOIJaSz9GWFg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"2213\">Now&nbsp;migrate the table<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php artisan migrate<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*Am7vtgK6Jobh26mh23WX2g.png\" alt=\"\"\/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"4ccf\">Step 4: Add Resource Route<\/h1>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br><br>use App\\Http\\Controllers\\ProductController;<br><br><br>\/*<br>|--------------------------------------------------------------------------<br>| Web Routes<br>|--------------------------------------------------------------------------<br>|<br>| Here is where you can register web routes for your application. These<br>| routes are loaded by the RouteServiceProvider within a group which<br>| contains the \"web\" middleware group. Now create something great!<br>|<br>*\/<br><br>Route::get('\/', function () {<br>    return view('welcome');<br>});<br><br><br>\/\/ Route::resource('products', ProductController::class);<br><br>Route::resource('products', ProductController::class);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"1a3b\">Step 5: Go to Your Controller and paste below code in your controller file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>  <br>namespace App\\Http\\Controllers;<br>  <br>use App\\Product;<br>use Illuminate\\Http\\Request;<br>  <br>class ProductController extends Controller<br>{<br>    \/**<br>     * Display a listing of the resource.<br>     *<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function index()<br>    {<br>        $products = Product::latest()-&gt;paginate(5);<br>    <br>        return view('products.index',compact('products'))<br>            -&gt;with('i', (request()-&gt;input('page', 1) - 1) * 5);<br>    }<br>   <br>    \/**<br>     * Show the form for creating a new resource.<br>     *<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function create()<br>    {<br>        return view('products.create');<br>    }<br>    <br>    \/**<br>     * Store a newly created resource in storage.<br>     *<br>     * @param  \\Illuminate\\Http\\Request  $request<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function store(Request $request)<br>    {<br>        $request-&gt;validate([<br>            'name' =&gt; 'required',<br>            'detail' =&gt; 'required',<br>            'image' =&gt; 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',<br>        ]);<br>  <br>        $input = $request-&gt;all();<br>  <br>        if ($image = $request-&gt;file('image')) {<br>            $destinationPath = 'image\/';<br>            $profileImage = date('YmdHis') . \".\" . $image-&gt;getClientOriginalExtension();<br>            $image-&gt;move($destinationPath, $profileImage);<br>            $input['image'] = \"$profileImage\";<br>        }<br>    <br>        Product::create($input);<br>     <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product created successfully.');<br>    }<br>     <br>    \/**<br>     * Display the specified resource.<br>     *<br>     * @param  \\App\\Product  $product<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function show(Product $product)<br>    {<br>        return view('products.show',compact('product'));<br>    }<br>     <br>    \/**<br>     * Show the form for editing the specified resource.<br>     *<br>     * @param  \\App\\Product  $product<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function edit(Product $product)<br>    {<br>        return view('products.edit',compact('product'));<br>    }<br>    <br>    \/**<br>     * Update the specified resource in storage.<br>     *<br>     * @param  \\Illuminate\\Http\\Request  $request<br>     * @param  \\App\\Product  $product<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function update(Request $request, Product $product)<br>    {<br>        $request-&gt;validate([<br>            'name' =&gt; 'required',<br>            'detail' =&gt; 'required'<br>        ]);<br>  <br>        $input = $request-&gt;all();<br>  <br>        if ($image = $request-&gt;file('image')) {<br>            $destinationPath = 'image\/';<br>            $profileImage = date('YmdHis') . \".\" . $image-&gt;getClientOriginalExtension();<br>            $image-&gt;move($destinationPath, $profileImage);<br>            $input['image'] = \"$profileImage\";<br>        }else{<br>            unset($input['image']);<br>        }<br>          <br>        $product-&gt;update($input);<br>    <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product updated successfully');<br>    }<br>  <br>    \/**<br>     * Remove the specified resource from storage.<br>     *<br>     * @param  \\App\\Product  $product<br>     * @return \\Illuminate\\Http\\Response<br>     *\/<br>    public function destroy(Product $product)<br>    {<br>        $product-&gt;delete();<br>     <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product deleted successfully');<br>    }<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"4749\">Next go to model and paste in below code<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"00cd\"><strong>app\/Models\/Product.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br><br>namespace App;<br><br>use Illuminate\\Database\\Eloquent\\Model;<br><br>class product extends Model<br>{<br>    protected $fillable = [<br>        'name','detail','image'<br>    ];<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"fe2e\">Step 6: Add Blade Files<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"02a3\"><strong>1) layout.blade.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"f1d8\"><strong>2) index.blade.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"9d29\"><strong>3) create.blade.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"3bcf\"><strong>4) edit.blade.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"1ae8\"><strong>5) show.blade.php<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"353e\"><strong>resources\/views\/products\/layout.blade.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Laravel Crud Operation laravel amit&lt;\/title&gt;<br>    &lt;link href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/twitter-bootstrap\/4.0.0-alpha\/css\/bootstrap.css\" rel=\"stylesheet\"&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>  <br>&lt;div class=\"container\"&gt;<br>    @yield('content')<br>&lt;\/div&gt;<br>   <br>&lt;\/body&gt;<br>&lt;\/html&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"05c1\"><strong>resources\/views\/products\/index.blade.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@extends('products.layout')<br>     <br>@section('content')<br>    &lt;div class=\"row\"&gt;<br>        &lt;div class=\"col-lg-12 margin-tb\"&gt;<br>            &lt;div class=\"pull-left\"&gt;<br>                &lt;h2&gt;Laravel Crud Operation with Image store Laravel Amit&lt;\/h2&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"pull-right\"&gt;<br>                &lt;a class=\"btn btn-success\" href=\"{{ route('products.create') }}\"&gt; Create New Product&lt;\/a&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>    <br>    @if ($message = Session::get('success'))<br>        &lt;div class=\"alert alert-success\"&gt;<br>            &lt;p&gt;{{ $message }}&lt;\/p&gt;<br>        &lt;\/div&gt;<br>    @endif<br>     <br>    &lt;table class=\"table table-bordered\"&gt;<br>        &lt;tr&gt;<br>            &lt;th&gt;No&lt;\/th&gt;<br>            &lt;th&gt;Image&lt;\/th&gt;<br>            &lt;th&gt;Name&lt;\/th&gt;<br>            &lt;th&gt;Details&lt;\/th&gt;<br>            &lt;th width=\"280px\"&gt;Action&lt;\/th&gt;<br>        &lt;\/tr&gt;<br>        @foreach ($products as $product)<br>        &lt;tr&gt;<br>            &lt;td&gt;{{ ++$i }}&lt;\/td&gt;<br>            &lt;td&gt;&lt;img src=\"\/image\/{{ $product-&gt;image }}\" width=\"100px\"&gt;&lt;\/td&gt;<br>            &lt;td&gt;{{ $product-&gt;name }}&lt;\/td&gt;<br>            &lt;td&gt;{{ $product-&gt;detail }}&lt;\/td&gt;<br>            &lt;td&gt;<br>                &lt;form action=\"{{ route('products.destroy',$product-&gt;id) }}\" method=\"POST\"&gt;<br>     <br>                    &lt;a class=\"btn btn-info\" href=\"{{ route('products.show',$product-&gt;id) }}\"&gt;Show&lt;\/a&gt;<br>      <br>                    &lt;a class=\"btn btn-primary\" href=\"{{ route('products.edit',$product-&gt;id) }}\"&gt;Edit&lt;\/a&gt;<br>     <br>                    @csrf<br>                    @method('DELETE')<br>        <br>                    &lt;button type=\"submit\" class=\"btn btn-danger\"&gt;Delete&lt;\/button&gt;<br>                &lt;\/form&gt;<br>            &lt;\/td&gt;<br>        &lt;\/tr&gt;<br>        @endforeach<br>    &lt;\/table&gt;<br>    <br>    {!! $products-&gt;links() !!}<br>        <br>@endsection<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"edbf\"><strong>resources\/views\/products\/create.blade.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@extends('products.layout')<br>  <br>@section('content')<br>&lt;div class=\"row\"&gt;<br>    &lt;div class=\"col-lg-12 margin-tb\"&gt;<br>        &lt;div class=\"pull-left\"&gt;<br>            &lt;h2&gt;Add New Product&lt;\/h2&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"pull-right\"&gt;<br>            &lt;a class=\"btn btn-primary\" href=\"{{ route('products.index') }}\"&gt; Back&lt;\/a&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>&lt;\/div&gt;<br>     <br>@if ($errors-&gt;any())<br>    &lt;div class=\"alert alert-danger\"&gt;<br>        &lt;strong&gt;Whoops!&lt;\/strong&gt; There were some problems with your input.&lt;br&gt;&lt;br&gt;<br>        &lt;ul&gt;<br>            @foreach ($errors-&gt;all() as $error)<br>                &lt;li&gt;{{ $error }}&lt;\/li&gt;<br>            @endforeach<br>        &lt;\/ul&gt;<br>    &lt;\/div&gt;<br>@endif<br>     <br>&lt;form action=\"{{ route('products.store') }}\" method=\"POST\" enctype=\"multipart\/form-data\"&gt;<br>    @csrf<br>    <br>     &lt;div class=\"row\"&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Name:&lt;\/strong&gt;<br>                &lt;input type=\"text\" name=\"name\" class=\"form-control\" placeholder=\"Name\"&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Detail:&lt;\/strong&gt;<br>                &lt;textarea class=\"form-control\" style=\"height:150px\" name=\"detail\" placeholder=\"Detail\"&gt;&lt;\/textarea&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Image:&lt;\/strong&gt;<br>                &lt;input type=\"file\" name=\"image\" class=\"form-control\" placeholder=\"image\"&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12 text-center\"&gt;<br>                &lt;button type=\"submit\" class=\"btn btn-primary\"&gt;Submit&lt;\/button&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>     <br>&lt;\/form&gt;<br>@endsection<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"e96a\"><strong>resources\/views\/products\/edit.blade.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@extends('products.layout')<br>     <br>@section('content')<br>    &lt;div class=\"row\"&gt;<br>        &lt;div class=\"col-lg-12 margin-tb\"&gt;<br>            &lt;div class=\"pull-left\"&gt;<br>                &lt;h2&gt;Edit Product&lt;\/h2&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"pull-right\"&gt;<br>                &lt;a class=\"btn btn-primary\" href=\"{{ route('products.index') }}\"&gt; Back&lt;\/a&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>     <br>    @if ($errors-&gt;any())<br>        &lt;div class=\"alert alert-danger\"&gt;<br>            &lt;strong&gt;Whoops!&lt;\/strong&gt; There were some problems with your input.&lt;br&gt;&lt;br&gt;<br>            &lt;ul&gt;<br>                @foreach ($errors-&gt;all() as $error)<br>                    &lt;li&gt;{{ $error }}&lt;\/li&gt;<br>                @endforeach<br>            &lt;\/ul&gt;<br>        &lt;\/div&gt;<br>    @endif<br>    <br>    &lt;form action=\"{{ route('products.update',$product-&gt;id) }}\" method=\"POST\" enctype=\"multipart\/form-data\"&gt; <br>        @csrf<br>        @method('PUT')<br>     <br>         &lt;div class=\"row\"&gt;<br>            &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>                &lt;div class=\"form-group\"&gt;<br>                    &lt;strong&gt;Name:&lt;\/strong&gt;<br>                    &lt;input type=\"text\" name=\"name\" value=\"{{ $product-&gt;name }}\" class=\"form-control\" placeholder=\"Name\"&gt;<br>                &lt;\/div&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>                &lt;div class=\"form-group\"&gt;<br>                    &lt;strong&gt;Detail:&lt;\/strong&gt;<br>                    &lt;textarea class=\"form-control\" style=\"height:150px\" name=\"detail\" placeholder=\"Detail\"&gt;{{ $product-&gt;detail }}&lt;\/textarea&gt;<br>                &lt;\/div&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>                &lt;div class=\"form-group\"&gt;<br>                    &lt;strong&gt;Image:&lt;\/strong&gt;<br>                    &lt;input type=\"file\" name=\"image\" class=\"form-control\" placeholder=\"image\"&gt;<br>                    &lt;img src=\"\/image\/{{ $product-&gt;image }}\" width=\"300px\"&gt;<br>                &lt;\/div&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"col-xs-12 col-sm-12 col-md-12 text-center\"&gt;<br>              &lt;button type=\"submit\" class=\"btn btn-primary\"&gt;Submit&lt;\/button&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>     <br>    &lt;\/form&gt;<br>@endsection<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"62f2\"><strong>resources\/views\/products\/show.blade.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@extends('products.layout')<br>   <br>@section('content')<br>    &lt;div class=\"row\"&gt;<br>        &lt;div class=\"col-lg-12 margin-tb\"&gt;<br>            &lt;div class=\"pull-left\"&gt;<br>                &lt;h2&gt; Show Product&lt;\/h2&gt;<br>            &lt;\/div&gt;<br>            &lt;div class=\"pull-right\"&gt;<br>                &lt;a class=\"btn btn-primary\" href=\"{{ route('products.index') }}\"&gt; Back&lt;\/a&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>     <br>    &lt;div class=\"row\"&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Name:&lt;\/strong&gt;<br>                {{ $product-&gt;name }}<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Details:&lt;\/strong&gt;<br>                {{ $product-&gt;detail }}<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>        &lt;div class=\"col-xs-12 col-sm-12 col-md-12\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;strong&gt;Image:&lt;\/strong&gt;<br>                &lt;img src=\"\/image\/{{ $product-&gt;image }}\" width=\"500px\"&gt;<br>            &lt;\/div&gt;<br>        &lt;\/div&gt;<br>    &lt;\/div&gt;<br>@endsection<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"3f76\">Now php artisan serve<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/localhost:8000\/products<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"354f\">Now its open look like this \ud83d\udc47<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*56r6x-T7YPa5Ad0m9yQrQg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"0308\">Thanks \ud83d\ude4f\ud83d\ude4f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lets go to download project and set up to composer create-project laravel\/laravel form &#8220;5.8.*&#8221; Next go to .env file and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6960","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>In this tutorial I&#039;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"In this tutorial I&#039;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Lets go to download project and set up to composer create-project laravel\/laravel form &quot;5.8.*&quot; Next go to .env file and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-05T11:29:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-13T16:33:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"In this tutorial I&#8217;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps.\",\"datePublished\":\"2021-08-05T11:29:18+00:00\",\"dateModified\":\"2022-04-13T16:33:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/\"},\"wordCount\":194,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/miro.medium.com\\\/max\\\/700\\\/1*iVL4Rl5JPso6XeKiONXpVQ.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/\",\"name\":\"In this tutorial I'm going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/miro.medium.com\\\/max\\\/700\\\/1*iVL4Rl5JPso6XeKiONXpVQ.png\",\"datePublished\":\"2021-08-05T11:29:18+00:00\",\"dateModified\":\"2022-04-13T16:33:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#primaryimage\",\"url\":\"https:\\\/\\\/miro.medium.com\\\/max\\\/700\\\/1*iVL4Rl5JPso6XeKiONXpVQ.png\",\"contentUrl\":\"https:\\\/\\\/miro.medium.com\\\/max\\\/700\\\/1*iVL4Rl5JPso6XeKiONXpVQ.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"In this tutorial I&#8217;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"In this tutorial I'm going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/","og_locale":"en_US","og_type":"article","og_title":"In this tutorial I'm going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy","og_description":"Lets go to download project and set up to composer create-project laravel\/laravel form \"5.8.*\" Next go to .env file and [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-05T11:29:18+00:00","article_modified_time":"2022-04-13T16:33:34+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png","type":"","width":"","height":""}],"author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"In this tutorial I&#8217;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps.","datePublished":"2021-08-05T11:29:18+00:00","dateModified":"2022-04-13T16:33:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/"},"wordCount":194,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/","name":"In this tutorial I'm going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps. - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png","datePublished":"2021-08-05T11:29:18+00:00","dateModified":"2022-04-13T16:33:34+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#primaryimage","url":"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png","contentUrl":"https:\/\/miro.medium.com\/max\/700\/1*iVL4Rl5JPso6XeKiONXpVQ.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/in-this-tutorial-im-going-to-describe-about-crud-operation-how-to-install-project-and-setup-and-create-controller-models-migration-and-all-the-things-please-read-it-carefully-and-follow-some-easy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"In this tutorial I&#8217;m going to describe about crud operation how to install project and setup and create controller, models, migration and all the things please read it carefully and follow some easy steps."}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=6960"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6960\/revisions"}],"predecessor-version":[{"id":6966,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6960\/revisions\/6966"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=6960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=6960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=6960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}