munazzil

munazzil

Member Since 1 Year Ago

Colombo

Trainee Software Developer at multiblity.com

Experience Points 31,290
Experience Level 7

3,710 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 25
Lessons
Completed
Best Reply Awards 26
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.

26 Jun
22 hours ago

munazzil left a reply on Mix Is Compiling To Empty Js File

I have found some solution in google just include your pathe similar like below,

  const { mix } = require('laravel-mix');

mix

.js('resources/assets/js/app.js', 'public/js/app.js') .js('resources/assets/js/bootstrap.js', 'public/js/app.js') .js('resources/assets/js/plugins/jquery.appear.js', 'public/js/plugins/jquery.appear.js') .js('resources/assets/js/plugins/jquery.backstretch.min.js', 'public/js/plugins/jquery.backstretch.min.js') .js('resources/assets/js/plugins/modernizr.js', 'public/js/plugins/modernizr.js') .combine([ 'resources/assets/js/libs/app.js', 'resources/assets/js/libs/bootstrap.js', 'resources/assets/js/libs/custom.js', 'resources/assets/js/libs/gmap.js', 'resources/assets/js/libs/ipad.js', 'resources/assets/js/libs/jquery.form.min.js', 'resources/assets/js/libs/jquery.min.js', 'resources/assets/js/libs/jquery.pjax.js', 'resources/assets/js/libs/jquery.slim.min.js', 'resources/assets/js/libs/myform.js', 'resources/assets/js/libs/sb-admin-2.js', 'resources/assets/js/libs/sb-admin-2.min.js', 'resources/assets/js/libs/sticky.js', 'resources/assets/js/libs/template.js',], 'public/js/libs/libs.js') .js('resources/assets/js/isotope/isotope.pkgd.min.js', 'public/js/plugins/isotope/isotope.pkgd.min.js') .sass('resources/assets/sass/app.scss', 'public/css/lib.css') .version();

munazzil left a reply on How To Pass Multiple Variables In WithErrors?

Something try like this,

   public function store(Request $request)

{
    //dd($request); //You can check every data is coming from form.         
    $data = $request->all();
    
    
      request()->validate([
        'firstname' => 'required|string|min:2',
        'middlename' => 'nullable',         
    'lastname' => 'required|string|min:2',
    'email' => 'required|email',            
       ]);
        
     Account::create($data);

        }

munazzil left a reply on Password Validate Rules

Something like this use,

    function password($string) {

    $string = trim($string); // Trim String

    $string = strtolower($string); //Unwanted:  {UPPERCASE} ; / ? : @ & = + $ , . ! ~ * ' ( )

    $string = preg_replace("/[^a-z0-9_\s-]/", "", $string);  //Strip any unwanted characters

    $string = preg_replace("/[\s-]+/", " ", $string); // Clean multiple dashes or whitespaces

    $string = preg_replace("/[\s_]/", "-", $string); //Convert whitespaces and underscore to dash

    return $string;

}

munazzil left a reply on Npm Run Watch Displays Error After Compiling Then Stops Watching

Have you try with below command and see,

  npm run dev

then it is most probably cache error try to remove cache,

  php artisan cache:clear
  php artisan view:clear

munazzil left a reply on Form Not Found

Have you used as like below in config\app.php,

'providers' =>

      [ 
           'Collective\Html\HtmlServiceProvider',
      ]

and 'aliases' =>

     [
          'Form' => 'Collective\Html\FormFacade',
      'Html' => 'Collective\Html\HtmlFacade',
     ]

and add composer.json as like below,

 "require": {

        "laravelcollective/html": "~5.0",
      },

and after try to use as @bobbybouwmann suggested.

25 Jun
1 day ago

munazzil left a reply on Mix Is Compiling To Empty Js File

Yes i am also faced similar problem and i have include below cdn then it works for me perfectly,

  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

munazzil left a reply on How To Change Default Path Of File Storage

You can use something like below for move the path,

   $file->move(public_path().'/files/',$filename);

munazzil left a reply on Mix Is Compiling To Empty Js File

you have to include the script in your main.blade.php otherwise it gives error,

 <link href="{{ mix('css/app.css') }}" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="{{ mix('js/app.js') }}"></script>

munazzil left a reply on How To Change Default Path Of File Storage

Create manually files in your public folder then change below path for according to that,

    File::create([
        'filename' => $file->getClientOriginalName(),
        'path' => $file->store('public/files') //changes made
    ]);
24 Jun
2 days ago

munazzil left a reply on Migrate:rollback Is Not Working When Test Stop

Have you tried with below command?

 php artisan migrate:refresh

munazzil left a reply on Route Error Forbidden

Where are you getting this $data and check what @snapey suggested.

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

Can you marked as solved please then it easy for others?

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

You have to get in the view as like below,

   {{ $activity->subject->title }} 

and if you pass parameters in the function no need to include in return remove 'profileUser' => $user,,

   return view('profiles.show', [
        
        'activities' => $activities
    ]);

munazzil left a reply on Bug When I Manually Login Users

Have you checked with below just add to your route middleware and check,

 Route::get('/','[email protected]')->middleware('auth');
21 Jun
5 days ago

munazzil left a reply on Scripts Not Running

After you put there you have to run below command in your CMD,

   npm run dev

munazzil left a reply on Uncaught ReferenceError: Require Is Not Defined In Vuejs Laravel

Have you mention below one as well

 require('./bootstrap');

after adding that run in console

 npm run dev

munazzil left a reply on How To Get Data From Database?

controller function is like below,

   function index()
     {

     $users = DB::table('role_users')->pluck('role_id');
    
     return view('index.view',compact('users'));

     }

and view

     @foreach($users as $user)   

       {{$user}}

      @endforeach

munazzil left a reply on How To Get Data From Database?

Can get like below,

$contact_users = DB::table('role_users')->pluck('role_id');

munazzil left a reply on Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity Constraint Violation: 1452 Cannot Add Or Update A Child Row: A Foreign Key Constraint Fails

You have to keep both id as same bigInteger otherwise foreign key not created and you have to run accordingly database tables,

 $table->bigInteger('id');
 $table->bigInteger('group_id')->unsigned();

munazzil left a reply on Form POST Not Working

Check as like below in your controller function,

public function store(Request $request) { $data = $request->all(); dd($data);

}

20 Jun
6 days ago

munazzil left a reply on How Can Show Only My Old Post?

Something like then use below,

$posts = Post::latest()->get();

munazzil left a reply on How Can Show Only My Old Post?

Use as like below in your function,

 $posts= Post::oldest();

munazzil left a reply on Using NPM Packages

Once you have made changes use below command that will make the impact

 npm run dev

and below artisan command will help you to start local server and can check using localhost otherwise you won't able to check whatever you have done,

php artisan serve 

and navigate to the url as like below,

 localhost:8000/your_name

munazzil left a reply on Issue Submitting Form Data From Bootstrap 4 Modal

I think you have created resource controller and you have created CRUD,Then use as like below for request

  function  store(Request $request){

    $data = $request->all();
    dd($data);
 }

munazzil left a reply on How To Redirect User Into Its Default Homepage

Have you changed this path as like below app\Http\Controllers\Auth\LoginController.php,

   protected $redirectTo = '/home';

and remove below route,

   Route::get('/', function () {
   return view('welcome');
   });
19 Jun
1 week ago

munazzil left a reply on Argument 2 Passed To Maatwebsite\Excel\Excel::download() Must Be Of The Type String, Object Given, Called In D:\xampp\htdocs\laravel\webpro3\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php On Line 237

Use toArray when you use get() it also give a collection then either you can use as like below,

  $pdf_data = DB::table('importpdfs')->toArray();

else you can use as like below

   $pdf_data = DB::table('importpdfs')->get();
18 Jun
1 week ago

munazzil left a reply on Call To A Member Function ToArray() On Null

If you are using first() that will give only first data and there is no any collection of data then use get() then there will be a collection and can turn that to the array as like below,

 if( !empty($menu= Menu::where('url', '=', $url)->get()->toArray()))

munazzil left a reply on My Views Return A Blank Page

Can you check with below command that shows available every views in your app,

  php artisan route:list

munazzil left a reply on VueJS File Upload, Not Working

@MANSHU - Yes @manshu We eagerly waiting for code.Thank You.

14 Jun
1 week ago

munazzil left a reply on Filter Results From Dropdown In Laravel

Then you have to use @if condition and get the data to there Then you have to use every drom,

 @if($pdfdata->file_id)

    <th>File_ID</th>
    <td>{{ $pdfdata->file_id }}</td>

munazzil left a reply on Search Is Not Working Laravel 5.8

@deansatch Suggested something like below remove the Keyword and add address,

  $posts = Post::where('title','LIKE','%'.$address.'%')

munazzil left a reply on Filter Results From Dropdown In Laravel

Inside foreach you can't use same variable name change it,

    @foreach ($pdfdata as $pdfdata1) //or something

munazzil left a reply on How To Login Admin, Direct Go To Admin Panel

Check as like below,

  public function handle($request, Closure $next)

{

    if (auth()->user()->isAdmin() || auth()->user()->isOperator()) {
        //return $next($request);
        return redirect()->route('panel.index');
    }else{

return redirect('/login');

} }

munazzil left a reply on Too Few Arguments To Function App\Http\Controllers\ShowrecordController::index(), 0 Passed And Exactly 1 Expected

Your already getting id from this

      $data = File::findOrFail($id);

and you have to remove id because normally we are not pass any parameter in index() and data,pdfdata will pass in compact function ,

     public function index()
{
$data = File::findOrFail($id);

$pdfdata = \DB::table('importpdfs')->get();

return view('showrecord', compact('data', 'pdfdata '));
}

munazzil left a reply on How To Get Values In View Table From Db

Your getting data from only ````$pdfdataand not$importpdfsjust use the query as like below change$pdfdatato $importpdfs```,

    $importpdfs= DB::table('importpdfs')
                  ->where('ST', '>=', 7)
                  ->orWhere('SAS', '>=', 120)
                  ->orWhere('NPR', '>=', 90)
                  ->get();

munazzil left a reply on Is It Possible To Cache External Images?

Until your hard reset it or have you use below command in your CMD,

   php artisan cache:clear
13 Jun
1 week ago

munazzil left a reply on Function Update Doens't Work

In your model set as like below as well,

   public $incrementing = false;

munazzil left a reply on If Condition Cant Work

You want to check with not empty then use !empty as like below otherwise first condition not excuted,

 @if(!empty($interviewschedule)) 
        Data empty
 @elseif($interviewschedule == "basic")
    Has Basic Data
 @else
    False
 @endif

munazzil left a reply on Where Is The SQL Statement For Inserting Data Into The User Table When Registering?

Check your app\Http\Controllers\Auth\RegisterController.php.

munazzil left a reply on Function Update Doens't Work

Change as like below your update query,

      $this->missionRepository->update($request->all());

munazzil left a reply on Regular Expression Constraints Won't Work In Laravel

Check with below command in your CMD?

  php artisan route:list

munazzil left a reply on Laravel Login Using Id From Different Database

@snapey Yes i don't have an idea about that, But as per her request she looking for 2 of the databases that why suggested.

munazzil left a reply on Laravel Login Using Id From Different Database

Your missing to define the table name in user.php,

   protected $table = 'users';

munazzil left a reply on Display Specific Images With Captions

Something like below you can try,

 {{ $package->image->caption }}

munazzil left a reply on Display Specific Images With Captions

Use like this and check your controller function,

$packages = Packages::get()->toArray();
 
  {{ $package->caption }}

and you can get images like this as well,

munazzil left a reply on Laravel Login Using Id From Different Database

Have you check your HomeController.php and change the below function according to your redirect page,

public function index() { return view('employeelogin'); }

munazzil left a reply on Blank Page After Server Change

What is your laravel version and check this Documentation,

https://laravel.com/docs/5.8/installation#web-server-configuration

munazzil left a reply on Auth Scaffolding RedirectTo Doesn't Work

Have you change the web.php route file and you have to change homecontroller.php index.php

     public function index()
{
    return view('dashboard');
}