munazzil

munazzil

Trainee Software Developer at multiblity.com

Colombo

Member Since 8 Months Ago

Experience Points 14,160
Experience
Level
Lessons Completed 6
Lessons
Completed
Best Reply Awards 14
Best Answer
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 Dec
5 hours ago

munazzil left a reply on ErrorException: Trying To Get Property Of Non-object

Then Suggest you that use foreach loop in that multiple messages. Then you can get so many messages Can be in display in blade.

munazzil left a reply on Failed Login Or Failed Registering Attempt Redirects To /(home) On Server, But Working Fine On Local Server

Use as like below and check in your app.blade.php.

@if ($message = Session::get('error'))
    <div class="alert alert-success">
        <p>{{ $message }}</p>
    </div>
    @endif

munazzil left a reply on Syntax Error, Unexpected 'class' (T_CLASS) In Laravel Cart

I think your mistake in input type="hidden" for name? change it to the text as like below.

       <form action="{{ route('quote.store') }}" method="POST">
            {{ csrf_field() }}
            <input type="hidden" name="id" value="{{ $product->id }}">
            <input type="text" name="name" value="{{ $product->name }}">
            <button type="submit" class="btn btn-lg valBtn text-uppercase">Request 
          Quote</button>
        </form>

munazzil left a reply on Python Backend, Laravel Frontend, API Connection

Yes if your using API then it is good for go to to Angular.js,Node.js or as @gurur said. Because laravel is good for backend developing.

14 Dec
3 days ago

munazzil left a reply on Error In Shiow.blade

The given code is correct. Your error should be in web.php. Something like this is better.

Route::resource('posts','PostController');

or else

Route::get('posts/{post}','[email protected]')

munazzil left a reply on SQLSTATE[42S22] I Have Problem Sql In Laravel..

Use as ike below and check.

->orWhereIn('(YEAR(CURRENT_TIMESTAMP) - YEAR(seeker_DOB)) BETWEEN 20 AND 30')

munazzil left a reply on SQLSTATE[42S22] I Have Problem Sql In Laravel..

Use WhereIn or orWhereIn.

->WhereIn('YEAR(CURRENT_TIMESTAMP) - YEAR(seeker_DOB) BETWEEN 20 AND 30')

munazzil left a reply on How To Limit Records Per Key Value In Sql

Use in your controller function.

          $model = Model::take(7)->get();

munazzil left a reply on Save And Save & Close In The Same Form

In your controller function use as like below.

return view('Your.index');//your page

and submit button

<form action="{{ route('users.destroy',$user->id) }}" method="POST">                            
    <a class="btn btn-primary" href="{{ route('users.edit',$user->id) }}"> Edit </a>                            
        @csrf
        @method('DELETE')   
<button type="submit" class="btn btn-danger" onclick= "return confirm('Are You Sure Want 
      to Delete?')"> Delete </button>
</form>

munazzil left a reply on Invalid Argument Supplied For Foreach()

You have to assign $result as a array.

     <?php include("koneksi.php"); ?>

     <?php $result=[]  ?>

      <?php $result = mysqli_query("SELECT * FROM tb_detail"); ?>

      <?php foreach($result as $data){

          echo $data['position'];
     } 

     ?>

munazzil left a reply on Need Id Of Updated Record In Given Below Code.

Use as like below and check.

$user_id =DB::table('users')->where('user_mobile',$user_mobile)->update([
                'otp'           => $request->$otp,
                'userVerified'  => '0',
                'updated_at'    => Carbon::now(),
            ]);

munazzil left a reply on Error In Route:list

Use below code in your user model

use Illuminate\Notifications\Notifiable;

   class User extends Authenticatable
 {
    use Notifiable;

munazzil left a reply on LOGIN ROUTE PROBLEM

In your app/LoginController.php change as like below.

    protected $redirectTo = '/login';

munazzil left a reply on How Can I Get Resource Store Route Laravel

Have you used as like below.

              Route::resource('/post', 'PostController');

Can you show full list

           php artisan route:list
13 Dec
4 days ago

munazzil left a reply on Head Tag Title, Blade, And Language

You have to use

      @endsection

munazzil left a reply on Signed Route, Get Value From URL

In store function this should be like this $signature = request()->signature;

     $signature = $request()->signature;

and type below command in CMD and display.

    php artisan route:list

munazzil left a reply on Laravel Does Not Display Images In The View From Storage Folder

Can you guys show your images folder path? and one is working remotely ?

12 Dec
5 days ago

munazzil left a reply on Why Did Not Search Combine Key Words In Algolia In Laravel 5.6?

Use as like below

 @forelse( $vehicles as $vehicule )

            <td>
   @if( $vehicule->uploads->count() == 0 )
                    <a href="{{ route('vehicles.show', $vehicule->id) }}">
                        @php
                            $upload = $vehicule->uploads->sortByDesc('id')->first();
                        @endphp
                        <img src="{{asset('/images/'.$upload->resized_name)}}" ></a>
                    </a>  

                @else
                    This vehicule does not have any images attached.
                     <!-- <img src="/images/{{'noimage.png'}}"> -->
                @endif
    </td>
        @empty
            <td>No vehicules to display.</td>
        @endforelse

else change like this

 @if( $vehicule->uploads->count() ,1 )

munazzil left a reply on Laravel Passport Auth:api Middleware Issue

@IOCOD - You can get authenticated user fro as like below

    auth()->user()->id

munazzil left a reply on Change Date Format

@FATIMA1 - Thank you

munazzil left a reply on Change Date Format

@FATIMA1 - Can you please share that code over here?

munazzil left a reply on Change Date Format

'created_at' => $json->created_at->format('dd/mm/yyyy');

munazzil left a reply on Laravel Does Not Display Images In The View From Storage Folder

Then it could be error in blade.php. view part.

munazzil left a reply on Laravel Does Not Display Images In The View From Storage Folder

Then use,

       <img src="{{asset(/storage/public/cover_images/{{ $book->image }})}}"/>

munazzil left a reply on Error In SQLSTATE[22007]: Invalid Datetime Format: 1366 Incorrect Integer Value: '' For Column 'landline' At Row 1 (SQL:

You have to assign like in your company model

    protected $primarykey='id';

else in migration you have to set like below

          $table->increments('id')->->primary();

munazzil left a reply on Array

Can you show your data in function.

munazzil left a reply on Laravel Mix Extract Problem

Use as like below then.and run above commands in cmd.

    <script src="{{ mix('js/vendor.js') }}"></script>

munazzil left a reply on Array

Use foreach condition twice.

      @foreach($foo as $foos)

          @foreach($foos as $fooos)


              @endeach  

      @endeach

munazzil left a reply on Laravel Mix Extract Problem

Use as like below in your app.blade.php.

                <script src="{{ mix('js/app.js') }}"></script>

and type below command

    npm run dev

munazzil left a reply on Laravel Does Not Display Images In The View From Storage Folder

Have you tried with below.If your using with asset no need to give storage.

    <img src="{{ asset('cover_images/'. $book->image) }}"/>

munazzil left a reply on Laravel Passport Auth:api Middleware Issue

No you have use as like this.

public function __construct()
 {     
 $this->middleware(function ($request,Closure $next) {
  $this->user = Auth::user();
  return $next($request);

  });
  }
11 Dec
6 days ago

munazzil left a reply on Submit Buttons On Same Line?

@VESUNAR - I have posted code here is what I used in my project in laravel 5.6.If you have tried that?

munazzil left a reply on Submit Buttons On Same Line?

You can use as like below in a form before @method('DELETE'),@csrf you can add other buttons.

     <form id="delete-form" method="POST" action="{{ route('contacts.destroy', $contacts->id) }}">

             <div class="form-group">
                    <div class="control">
                        <button type="submit" class="btn btn-primary">Update</button>
                    </div>
                </div>
        @method('DELETE')
        @csrf

            <div class="form-group">
                <div class="control">
                    <button type="submit" class="btn btn-danger" 
            onclick="confirmDelete(event)">Delete</button>
                </div>
            </div>      
    </form>

munazzil left a reply on Laravel Passport Auth:api Middleware Issue

@DIPANKARB - @dipankarb use the link between``` above the tab symbol.

munazzil left a reply on Doctrine Timestamps Error

In your validation you got the problem in your controller create function?

munazzil left a reply on Trying To Get Property 'id' Of Non-object

Use as like below and check

public function index() {

    $universities = University::oldest()->get();

    return view('university.index', ['universities' => $universities]);
  }

munazzil left a reply on Laravel Passport Auth:api Middleware Issue

Your using is correct.You have missed this one word in Closure. use as like below and check.

public function __construct() { $this->middleware(function ($request,Closure $next) { $this->user = Auth::user(); return $next($request);

      });
}

munazzil left a reply on Error On Controller Using Foreach

Use as like below

$order=Order::findorFail($id);

munazzil left a reply on Doctrine Timestamps Error

Can you show controller function for this?

munazzil left a reply on Laravel Passport Auth:api Middleware Issue

Have you called function as like below

public function __construct() { $this->middleware('auth');

}

munazzil left a reply on Store Method In API

Use laravel passport example as i have created with CRUD using that vue+laravel.

    https://github.com/laravel/passport

munazzil left a reply on Page Not Found

Your try to get this route then remove 'as'=>'admin' because it was already mention in group.

     Route::get('/', ['uses'=>'Admin\[email protected]']);

Can you show the result for below command

    php artisan route:list

munazzil left a reply on Update Row Of Database On Laravel

Then you can set in your database migration inventory id,payment as like below

    $table->integer('inventory_id')->default(1);
    $table->integer('payment')->default(1);
07 Dec
1 week ago

munazzil left a reply on NotFoundHttpException::guard()

Just use as like below if condition.

if (Auth::guard($guard)->check())

munazzil left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

This script work fine to your project, With this you can run npm dev Command in CMD.

munazzil left a reply on How To Print Brandnames When Click Its Categoryname In Laravel 5.6

Pass it as key value and used it.

@foreach($names as $key=>$name)
                <tr>
                <th><a href="{{$name->categoryname}}"></a></th>
                <td><span class="label label-info">{{$name->cnt}}</span></td>

        </tr>
                @endforeach

munazzil left a reply on NotFoundHttpException::guard()

You have to use as like below pass $guard on the parameter.

protected function unauthenticated($request, AuthenticationException $exception,$guard = null)
{
    if ($request->expectsJson()) {
        return response()->json(['error' => 'Unauthenticated.'], 401);
    }
    $class = get_class($exception);
    switch($class) {
        case 'Illuminate\Auth\AuthenticationException':
            $guard = array_get($exception->guards(), 0);
            switch ($guard) {
                case 'partner':
                    $login = 'partner.signin';
                    break;
                default:
                    $login = 'user.signin';
                    break;
       }
       return redirect()->route($login);
    }
}

munazzil left a reply on Auth

Use as like below,

    \Auth::user();

munazzil left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

@wilk_randall

I have installed NPM package and it not worked fine after i added this script and got it works laravel+vue.js.

munazzil left a reply on Delete Confirmation In Form Button

Use as like below for javascript easy pop up

     <button  id="btnDelete" type="submit" onclick= "return confirm('Are You Sure Want to Delete?')" class="btn btn-warning btn-lg">Delete</button>