NikhilLVL

Member Since 3 Months Ago

Experience Points
740
Total
Experience

4,260 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 Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

  • Community Pillar

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

Level 1
740 XP
Jan
12
2 weeks ago
Activity icon

Started a new Conversation Updation Of Values

There are fields name,place,phone and email of users in a table 'users'. When a user clicks on the 'profile' link on his page, details of the respective 'user_id' will be displayed on his profile page. Is there any easy way to edit each of those values, rather than editing every values(name,email,phone and place). Should I make a controller and view for editing every values ?

Dec
30
3 weeks ago
Activity icon

Started a new Conversation Can't See Error

Can't see error in the new updation of composer. It displays on the title of the web page and cannot watch it completely. How to resolve error without watching it ?

Nov
22
2 months ago
Activity icon

Started a new Conversation Where To Find A Deleted View ?

I accidentally deleted one of my views. How to restore it, is there any way ?

Nov
21
2 months ago
Activity icon

Started a new Conversation SQLSTATE[23000]: Integrity Constraint Violation: 1048 Column 'address' Cannot Be Null

I was trying to update my table details. Here's my controller: $data=Detail::find($id); $data->company_name=request('new_company_name'); $data->address=request('new_address'); $data->place=request('new_place'); $data->country=request('new_country'); $data->company_email=request('new_company_email'); $data->company_phone=request('new_company_phone'); $data->save();

But getting above error. How to solve this ?

Nov
16
2 months ago
Activity icon

Replied to Differentiating An Empty Set

Sir, but I want to take just one row of values from a table. So if not using foreach(using 'first' instead of 'get' in Model while retrieving value) how to handle it ?

Activity icon

Started a new Conversation Differentiating An Empty Set

I want to display a set of fields from a table 'news'. If the table does not have any fields then I want that field in the view to be blank. Is there any way to do this ?

Nov
15
2 months ago
Activity icon

Started a new Conversation Call To Undefined Method Illuminate\Session\Store::had()

Here's my index function in controller: public function index() { $details=Banner::getBanner(); $data=Category::allDetails(); $item=FeaturedCollection::Collections_User(); $news=News::takeNewsOfDay();

    $items=['banner'=>$details,'collection'=>$item,'value'=>$data,'val'=>$news];

    return view('user.userhome',$items);
}

Here's my first route which calls the above function Route::get('/','App\Http\Controllers\[email protected]');

But I got the error: Call to undefined method Illuminate\Session\Store::had()

Nov
10
2 months ago
Activity icon

Replied to Insertion Of Image Using Tinker

OK sir, but how to get an image from the system itself ?

Activity icon

Started a new Conversation Insertion Of Image Using Tinker

Can I insert image from tinker ? How to do it ?

Nov
09
2 months ago
Activity icon

Started a new Conversation Do..While In Laravel Blade

Is it possible to use do..while in laravel blade. I have a view which displays every field sets from a table 'category'

@foreach($category_detail as $item) {{$item->category_name}} {{$item->categoty_image}} @endforeach

I want a 'know more' link only with the first item from the category table. How to do it ?

Nov
04
2 months ago
Activity icon

Replied to Automatic Table Creation

Sorry sir, I did'nt get it.

Activity icon

Started a new Conversation Automatic Table Creation

Is automatic table creation possible in laravel ? I have a category table. Whenever a new value is inserted I want a new table(say sub_category) to be created with the name of the inserted value. How to do it ?

Nov
02
2 months ago
Activity icon

Started a new Conversation Regarding Calling A Variable In View

This is my model: public static function getBanner()//Takes only one row of values { $data=DB::table('banners')->first(); return $data; }

This is the code in my controller: $details['banner']=Banner::getBanner();

{{$banner->banner_type}}

But it's showing: Undefined variable banner

How to resolve this ?

Oct
14
3 months ago
Activity icon

Started a new Conversation Call To A Member Function GetClientOriginalName() On Null

Part in my blade:

@csrf Upload your image:

Here's the code in my controller:

    $file = $request->file('image');
    $filename = $file->getClientOriginalName();
    $file->move(public_path().'uploads/images',$filename);
    $data->image=$filename;
Activity icon

Started a new Conversation Getting Error On User Details Updation

Argument 2 passed to Symfony\Component\HttpFoundation\RedirectResponse::__construct() must be of the type int, object given, called in C:\xampp\htdocs\Laravel\Hotel_Reservation\vendor\laravel\framework\src\Illuminate\Routing\Redirector.php

This is my controller, which takes new values and update the users table: public function NewProfile(Request $request)//Updating user profile { $user_id=session('id'); $data=User::find($user_id); $data->name=request('new_name'); $data->address=request('new_address'); $data->phone=request('new_phone'); $data->gender=request('gender'); $data->loginid=request('loginid'); $data->save(); $data['info']=User::getProfile($user_id); return redirect('userProfile',$data); }

This is my blade: @extends("layout") @section("navigation")

  • Your Bookings
  • Logout
  • @endsection @section("insertContent") @foreach($info as $item) @csrf @method('PUT') Name: Address:{{$item->address}} Phone: Username: Password: @endforeach @endsection
    Oct
    10
    3 months ago
    Activity icon

    Started a new Conversation How To Use JQuery With A Blade In Laravel ?

    Here's the part in the blade:

    Seat type: @foreach($value as $seat)

    {{$seat->seat_type}} @endforeach

    When click on a 'seat-type' its respective 'price' from the same table should get displayed.

    How to make it possible ?

    Here's my function in Model:

    public static function getSeatType() { $data=DB::table('seat_types')->get(); return $data;//returns data to a view say 'booking.blade' }

    Activity icon

    Replied to How To Get A Single Integer Value From A Table In Laravel ?

    Thank you sir, I got the result

    Activity icon

    Started a new Conversation How To Get A Single Integer Value From A Table In Laravel ?

    How to get an integer value from a table in laravel ?

    This is my getSeatPrice() function in the Seat_type model:

    public static function getSeatPrice($seat_type) { $price=DB::table('seat_types')->where('seat_type',$seat_type)->get('price'); return $price; }

    Here is the code in my controller:

            $seat_type=$request->input('seat_type');
            $no_of_seats=$request->input('no_of_seats');
    
            $price=Seat_type::getSeatPrice($seat_type);
            
            $total=$no_of_seats*$price;
    

    '$price' should take the price of respective seat_type that is passed to the function getSeatPrice() in the model 'Seat_type'.

    The value is retrived as an array so the line '$total=$no_of_seats*$price;' ends in error: Object of class Illuminate\Support\Collection could not be converted to number.

    How to resolve this ?