programmer111

programmer111

Member Since 4 Months Ago

Experience Points 1,700
Experience Level 1

3,300 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

17 May
2 days ago

programmer111 left a reply on Data Is Not Deleting In Laravel

@SNAPEY - the problem was just that s was capital and I just small it and now is working:

  Swal.fire({

  to

  swal.fire({

programmer111 left a reply on Data Is Not Deleting In Laravel

@SNAPEY - Bro would u prefer to tell me how to solve this issue??

programmer111 left a reply on Data Is Not Deleting In Laravel

@SNAPEY - Bro build process is working, yes I hv loaded the compiled js and also used mix cache busting,,,,,,actually m weak in javascript and first time using vue.js and previously it was happened then I removed the vue and vue-compiler and reinstall it and then used running mix and recompile the assets then it started working but now this procedure isn't working so I posted this at here :)

programmer111 left a reply on Data Is Not Deleting In Laravel

@MTHOMAS - complete code is here https://paste.ofcode.org/mSYNjBRE66iNGLS3N8FwSH compiled but nthing happens

programmer111 started a new conversation Data Is Not Deleting In Laravel

hi m working on a project in Laravel-vue and wants to delete data using sweetalert but when I click on it then nthing happens, during npm run watch it shows this error:

  Errors compiling template:

   avoid using JavaScript keyword as property name: "delete"
   Raw expression: @click="delete"

   34 |                        /
   35 |                         
   36 |                        <a href="#" @click="delete">
      |                                    ^^^^^^^^^^^^^^^
   37 |                          <i class="fa fa-trash red"></i>
   38 |                        </a>

  @ ./resources/js/components/Users.vue?vue&type=template&id=30c27aa6& 1:0-209 1:0-209
  @ ./resources/js/components/Users.vue
  @ ./resources/js/app.js

code:

  <a href="#" @click="deleteUser(user.id)">
                      <i class="fa fa-trash red"></i>
                  </a>


    deleteUser(id){
           Swal.fire({
                  title: 'Are you sure?',
                 text: "You won't be able to revert this!",
                 type: 'warning',
                 showCancelButton: true,
                 confirmButtonColor: '#3085d6',
                 cancelButtonColor: '#d33',
                 confirmButtonText: 'Yes, delete it!'
               }).then((result) => {

               //send request to the server

                 this.form.delete('api/user/'+id).then(()=>{
                     Swal.fire(
                       'Deleted!',
                       'Your file has been deleted.',
                       'success'
                        )
                  }).catch(()=>{
                      swal("Failed!", "There was something worng.", "warning");
                  });
                 
                })
         
         },

code of UserController.php

  public function destroy($id)
  {
    $user = User::FindOrFail($id);

    $user->delete();

    return ['message' => 'User Deleted'];
 }
15 May
4 days ago

programmer111 started a new conversation User Data Isn't Showing Form Db And Not Giving Any Error

hi, m working on Laravel-vue I have inserted data into db through vue component and now wants to show this data into web page(in admin panel) but its not showing, and not giving any error

Users.vue:

  loadUsers(){
             axios.get("api/user").then(({ data }) => (this.users = data.data));
         },

    <tr v-for="user in users" :key="user.id">
                <td>{{user.id}}</td>
                <td>{{user.name}}</td>
   </tr>

complete code is here: https://paste.ofcode.org/UgTyQBC4Ai4RTXtnL3p3ux

how to solve this issue

13 May
6 days ago

programmer111 started a new conversation Npm Run Watch Error

how to run the following command in windows cmd:

  rm -rf node_modules

programmer111 started a new conversation User Component Is Showing Another Output

hi I have just created a new component in Laravel-vue.js, but instead of showing the data which is init its showing another thing and when I add anyother thing then result remains same, its not editable: code of Users.vue:

  <template>
    <div class="container">
      <div class="row justify-content-center">
          <div class="col-md-8">
             <div class="card card-default">
                 <div class="card-header">Profile Component</div>

                  <div class="card-body">
                     I'm an example component.
                  </div>
             </div>
          </div>
       </div>
    </div>
  </template>

  <script>
     export default {
      mounted() {
         console.log('Component mounted.')
      }
   }
 </script>

and it showing this output https://ibb.co/2jWVs65 and its not changing

12 May
1 week ago

programmer111 left a reply on Problem With Axios POST

@RESPECT - bro would u prefer to tell me of m wrong that I paste this script at here https://ibb.co/zZtZG1N and result is https://ibb.co/pXbcn6G

programmer111 left a reply on Problem With Axios POST

@RESPECT - the complete error:

  app.js:285 POST http://127.0.0.1:8000/api/task 500 (Internal Server Error)
        dispatchXhrRequest @ app.js:285
        xhrAdapter @ app.js:119
        dispatchRequest @ app.js:724
        Promise.then (async)
        request @ app.js:531
        Axios.<computed> @ app.js:551
        wrap @ app.js:984
        addTask @ app.js:1831
        submit @ app.js:37199
        invokeWithErrorHandling @ app.js:39231
        invoker @ app.js:39556
        original._wrapper @ app.js:44909
  app.js:651 Uncaught (in promise) Error: Request failed with status code 500
            at createError (app.js:651)
            at settle (app.js:814)
            at XMLHttpRequest.handleLoad (app.js:184)
           createError @ app.js:651
           settle @ app.js:814
           handleLoad @ app.js:184
           XMLHttpRequest.send (async)
           dispatchXhrRequest @ app.js:285
           xhrAdapter @ app.js:119
           dispatchRequest @ app.js:724
           Promise.then (async)
           request @ app.js:531
           Axios.<computed> @ app.js:551
           wrap @ app.js:984
           addTask @ app.js:1831
           submit @ app.js:37199
           invokeWithErrorHandling @ app.js:39231
           invoker @ app.js:39556
           original._wrapper @ app.js:44909

programmer111 left a reply on Problem With Axios POST

@FTIERSCH - its not working still same issue

programmer111 started a new conversation Problem With Axios POST

hi m trying to save data in db using axios in vue.js but it gives this error:

  app.js:285 POST http://127.0.0.1:8000/api/task 500 (Internal Server Error)
 
  app.js:651 Uncaught (in promise) Error: Request failed with status code 500
    at createError (app.js:651)
    at settle (app.js:814)
    at XMLHttpRequest.handleLoad (app.js:184)

code:

  <script>
    export default {

     data(){
       return{
          title: ''
        }
      },

     mounted() {
         console.log('Component mounted.')
     },

     methods:{
         addTask(){
            axios.post('./api/task',{title:this.title});
            alert('Adding Task');
          }
      }
   }
  </script>

controller:

  public function store(Request $request)
  {
      Task::create($request->all());

      return (['message' => 'task was successful']);
   }
11 May
1 week ago

programmer111 left a reply on The Data Of Components Isn't Showing In Browser

@NASMED - I have followed the above steps but sory bro still same issue

programmer111 left a reply on The Data Of Components Isn't Showing In Browser

@NASMED - the Vue version and vue-template-compiler version are different, how can I make them same? just bymanually write it same or to run any command .

programmer111 started a new conversation The Data Of Components Isn't Showing In Browser

I have created the components in Laravel, but these components are not showing in browser, this is the link of complete source code: https://drive.google.com/file/d/1yco3ve6HvsTPZPk98hmXQ5G7RTYK1nw7/view?usp=sharing

Dashboard.vue:

  <template>
    <div class="container">
     <div class="row justify-content-center">
      <div class="col-md-8">
         <div class="card card-default">
             <div class="card-header">Dashboard Component</div>

             <div class="card-body">
                 I'm an example component.
            </div>
        </div>
    </div>
  </div>
   </div>
 </template>

    <script>
      export default {
        mounted() {
         console.log('Component mounted.')
         }
      }
    </script>

app.js:

  let routes = [
     { path: '/dashboard', component: require('./components/Dashboard.vue') },
     { path: '/users', component: require('./components/Users.vue') },
     { path: '/profile', component: require('./components/Profile.vue') }
   ]

screenshot of package.json: https://ibb.co/QcpCVc3

how to solve this issue?

04 May
2 weeks ago

programmer111 left a reply on New Component Is Not Displaying

@OZZFEST - updated the question

programmer111 started a new conversation New Component Is Not Displaying

hi, m new to vue and after installing it in Laravel, I make a new component but its not showing in browser, in developers tools > console it shows:

  app.js:37960 [Vue warn]: Failed to mount component: template or render function not defined.

   found in

  ---> <TaskForm>
   <Root>
  warn @ app.js:37960
  app.js:46384 You are running Vue in development mode.
  Make sure to turn on production mode when deploying for production.
  See more tips at https://vuejs.org/guide/deployment.html

any solution to resolve this issue?

19 Feb
3 months ago

programmer111 left a reply on Data Is Not Saving Into Db

@SERGIU17 - @mushood

can u plz check it, [email protected] pass= 123456

programmer111 left a reply on Data Is Not Saving Into Db

@MUSHOOD - sory bro still same issue

programmer111 left a reply on Data Is Not Saving Into Db

@SERGIU17 - Sorry, the page you are looking for could not be found. /public/admin/categories

programmer111 left a reply on Data Is Not Saving Into Db

@SERGIU17 - i changed the get to post, now it return me to the index when click on submit but still data is not submitting into db

programmer111 left a reply on Data Is Not Saving Into Db

@SERGIU17 - index is to show data from the db

programmer111 left a reply on Data Is Not Saving Into Db

@SNAPEY - nowhere, actually its first time that m using the resource controller, and all of my routes are working fine except this form submitting https://ibb.co/47GhF7s

programmer111 started a new conversation Data Is Not Saving Into Db

hi m trying to save data into db but it shows error page and says "no message"

code of controller (resource controller):

  public function create()
{
    return view('admin.categories.create');
}


public function store(Request $request)
{
    if ($request->isMethod('post')) {
        $data = $request->all();
        $category = new Category;
        $category->name = $data['category_name'];
        $category_description = $data['description'];
        $category->save();
    }
    return view('admin.categories.index');
}

create.blade.php

  <form class="k-form" method="post" action="{{ url('/admin/categories/index')}}" name="" 
    id="k_form">@csrf
                <div class="row">
                    <div class="col-xl-2"></div>
                    <div class="col-xl-8">
                        <div class="k-section k-section--first">
                        </div>
                        <div class="k-separator k-separator--border-dashed k-separator--space-lg"></div>
                        <div class="k-section">
                            <div class="k-section__body">
                                <h3 class="k-section__title k-section__title-lg">Add Category:</h3>
                                <div class="form-group row">
                                    <label class="col-3 col-form-label">Category Name:</label>
                                    <div class="col-9">
                                        <input class="form-control" type="text" name="category_name" value="" 
                required="required">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-3 col-form-label">Description:</label>
                                    <div class="col-9">
                                        <textarea name="description" required="required"></textarea>
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-3 col-form-label"></label>
                                    <div class="col-9">
                                        <div class="k-checkbox-single">
                                            <input type="submit" value="Add Category" style="background-color: #5867dd; 
         color: #fff; border-radius: 5px; padding: 10px;" name="">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="k-separator k-separator--border-dashed k-separator--space-lg"></div>
                    </div>
                    <div class="col-xl-2"></div>
                </div>
            </form>

Route:

  Route::match(['get', 'post'],'/admin/categories/create','[email protected]');
15 Feb
3 months ago

programmer111 left a reply on Route Isn't Working

@TOMOPONGRAC - yes AdminAuthenticated.php

  public function handle($request, Closure $next)
{
    if(Auth::user()->role->name == 'customer'){
        return redirect('/home')->with('message', "You are Not Allowed To Access");
    }
    return $next($request);
}

updated RedirectIfAuthenticated.php:

  public function handle($request, Closure $next, $guard = null)
  {
    if (Auth::guard($guard)->check()) {
        if(Auth::user()->role->name == 'admin')
            return redirect('/admin');
        else
            return redirect('/home');
    }

    return $next($request);
  }

programmer111 left a reply on Route Isn't Working

@SNAPEY - admin page which was working fine then i add the middleware, and now it's not working, the request m using is "localhost/laravel/ecom3/public/admin"

programmer111 left a reply on Route Isn't Working

@TOMOPONGRAC - same error

this is route list:

  +--------+----------+------------------------+------------------+------------------------------------------------------------------------+----------------+

| Domain | Method | URI | Name | Action | Middleware | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+----------------+ | | GET|HEAD | / | | Closure | web | | | GET|HEAD | admin/dashboard | admin.dashboard | App\Http\Controllers\[email protected] | web,auth,admin | | | GET|HEAD | api/user | | Closure | api,auth:api | | | GET|HEAD | home | home | App\Http\Controllers\[email protected] | web,auth | | | GET|HEAD | login | login | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | login | | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | logout | logout | App\Http\Controllers\Auth\[email protected] | web | | | POST | password/email | password.email | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | password/reset | password.update | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | register | register | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | register | | App\Http\Controllers\Auth\[email protected] | web,guest | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+----------------+

programmer111 started a new conversation Route Isn't Working

hi initially it was working but when i add middleware in it (, 'middleware'=>['auth','admin'], 'prefix'=>'admin') then it says page not found:

Route::group(['as'=>'admin.', 'middleware'=>['auth','admin'], 'prefix'=>'admin'], function () {

    Route::get('/admin/dashboard','[email protected]')->name('dashboard');

});
12 Feb
3 months ago

programmer111 started a new conversation Call To Undefined Method Barryvdh\Debugbar\Facade::isDeferred()

hi i install the debugger pulgin into my laravel project, initially it was working fine but now its showing the error:

  Call to undefined method Barryvdh\Debugbar\Facade::isDeferred()

how to resolve this issue

05 Feb
3 months ago

programmer111 left a reply on Data Is Inserting In Db But Displaying Error

@REALRANDYALLEN - data is submiting into db or using submitted data a user can also login, when i signup then data is submit into db but it shows this https://ibb.co/YLv6N5g this is controller https://paste.ofcode.org/RGqpftRqp9m4DFg6YfWGH3 this is login_register.blade.php https://paste.ofcode.org/4aWQTMsZ4mqTT4MrQqZe5

and route is:

  Route::post('/user-register','[email protected]');

programmer111 left a reply on Data Is Inserting In Db But Displaying Error

@REALRANDYALLEN - when i signup a new account then this error comes (data also inserts into db)

programmer111 started a new conversation Data Is Inserting In Db But Displaying Error

hi m working on user login_register from, when i signup then data inserts into db (and can also login), but browser says:

  maximum execution time of 30 seconds exceeded

in \vendor\phpunit\phpunit\appveyor.yml: its already 1200

  - IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini

any solution to resolve this issue

30 Jan
3 months ago

programmer111 left a reply on Checkout Form Isn't Submitting

@TRAY2 - it showing this https://ibb.co/KGkWBhq mean the values of form are coming but cart values are not coming

programmer111 left a reply on Checkout Form Isn't Submitting

@SNAPEY - SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'product_id' cannot be null (SQL: insert into orders (name, email, address, country, state, city, zipcode, mobile, product_id, product_code, product_name, product_price, product_qty, order_status, grand_total, updated_at, created_at) values

programmer111 left a reply on Checkout Form Isn't Submitting

@SNAPEY - u can see it https://ibb.co/vXnJhQN

in whole scenrio m getting the cart values in checkout page and also enter the order data in it then it shows the above error ,

the screnshot of checkout page is https://ibb.co/P5JYszC

whole of data i mean cart data and user order has to store in this table https://ibb.co/bbBHCky

complete cart.blade.php https://paste.ofcode.org/34jcNT6uF9jm88mkQSH3Xub

productscontroller: https://paste.ofcode.org/UPqyBBCbbqtCpV8XGMpHHx

naw plz anyone can tel me the real issue

programmer111 left a reply on Checkout Form Isn't Submitting

@TRAY2 - sory still same error after removing this line

29 Jan
3 months ago

programmer111 left a reply on Checkout Form Isn't Submitting

@TRAY2 - thnx added it but still same error

programmer111 left a reply on Checkout Form Isn't Submitting

@SNAPEY - i updated my ProductsController to:

    public function placeOrder(Request $request){
      if($request->isMethod('post')){
         $data = $request->all();

        $session_id = Session::get('session_id');
         if(empty($session_id)){
            $session_id = str_random(40);
            Session::put('session_id',$session_id);
         }

          $order = new Order;
          $order->id = $request->id;
          $order->name = $request->name;
          $order->email = $request->email;
          $order->address = $request->address;
          $order->country = $request->country;
          $order->state = $request->state;
          $order->city = $request->city;
          $order->zipcode = $request->zipcode;
          $order->mobile = $request->mobile;
          $order->product_id = $request->product_id;
          $order->product_code = $request->product_code;
          $order->product_name = $request->product_name;
          $order->product_price = $request->product_price;
          $order->product_qty = $request->product_qty;
          $order->order_status = "New";
          $order->grand_total = $request->data['grand_total'];
          $order->save();

        return view('products.checkout');

      }
  }

once the data submitted with showing this error:

  SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be null (SQL: insert 
  into `orders` 

https://ibb.co/vXnJhQN

and now againg only showing above error

programmer111 left a reply on Checkout Form Isn't Submitting

@TRAY2 - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'product_quantity' in 'field list' (SQL: insert into orders (id, name, email, address, country, state, city, zipcode, mobile, product_id, product_code, product_name, product_price, product_quantity, order_status, grand_total, updated_at, created_at) values (, user, [email protected], 1234 main, usa, cal, lhr, 1234, 1234567, , , , , , New, , 2019-01-29 19:20:02, 2019-01-29 19:20:02))

and plz see it once https://ibb.co/bbBHCky

programmer111 left a reply on Checkout Form Isn't Submitting

@CRONIX - yes dd() showing the data