afoysal

afoysal

Member Since 5 Years Ago

Experience Points
15,420
Total
Experience

4,580 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
17
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.

Level 4
15,420 XP
Aug
02
2 days ago
Activity icon

Replied to FullCalendar Is Not Defined

How to get JS/ HTML code from below code ?

{!! $calendar->calendar() !!}

{!! $calendar->script() !!}

Here is a screenshot of inspector tab of firefox.

error

Activity icon

Replied to FullCalendar Is Not Defined

Thanks @siangboon for your reply. I am fighting with it for last 5 days. I read your link. There is no Laravel code.

Could you please help me to initialize it first with some sample code of Laravel ?

Activity icon

Replied to FullCalendar Is Not Defined

Thanks @mvd. Which JS output would you like to see ? Thanks.

Activity icon

Started a new Conversation FullCalendar Is Not Defined

I am trying to implement Laravel FullCalendar. My View file is like below

<!doctype html>

<html lang="en">

<head>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>

    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css"/>

</head>

<body>

<div class="container">

    <div class="panel panel-primary">

        <div class="panel-heading">

            MY Calender    

        </div>

        <div class="panel-body" >

            {!! $calendar->calendar() !!}

            {!! $calendar->script() !!}

        </div>

    </div>

</div>

</body>

</html>

I am getting ReferenceError: FullCalendar is not defined error.

error

Jul
31
4 days ago
Activity icon

Replied to Blank White Screen In Google Calender

Thanks @siangboon . I tried a lot but couldn't solve blank white screen issue.

Activity icon

Replied to Blank White Screen In Google Calender

Thanks @silencebringer . Here is the console tab.

console

Thanks.

Jul
30
5 days ago
Activity icon

Started a new Conversation Blank White Screen In Google Calender

I am trying to display Google Calendar in Laravel application. I can fetch Google Calendar using this package.

My controller code is like below

<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Spatie\GoogleCalendar\Event;

use Calendar;

class HomeController extends BaseController
{
    public function calendar() {
        $events = [];
        $data = Event::get();

        if($data->count()){
            foreach ($data as $key => $value) {
                $events[] = Calendar::event(
                    $value->name,
                    true,
                    new \DateTime($value->startDate),
                    new \DateTime($value->endDate.' +1 day')
                );
            }
        }
        $calendar = Calendar::addEvents($events);

        //dd($calendar);

        return view('welcome', compact('calendar'));
    }
}

If I dd() I can get below data.

enter image description here

My view files code is like below

<!doctype html>
<html lang="en">

<head>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css" />
</head>

<body>
    {!! $calendar->calendar() !!}
    {!! $calendar->script() !!}
</body>

</html>

But I am getting white blank screen.

I used below codes in public/index.php file.

error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
ini_set("display_errors", 1);

But I am not getting any error.

There is no error in storage/laravel.log file also.

I am getting below situation when I go to console.

enter image description here

Activity icon

Replied to Display Google Calendar

Thanks @bobbybouwmann . Is there any Laravel way ?

Activity icon

Started a new Conversation Display Google Calendar

I am trying to display Google Calendar in Laravel application. I can fetch Google Calender using this package.

enter image description here

How can I display Calendar like below ?

enter image description here

Activity icon

Replied to FullCalendar In Laravel 7

Thanks @silencebringer & @sinnbeck. Actually I am trying to display Google Calendar in a Laravel application. I can connect with Google Calendar. But I couldn't display Calendar.

Could you please help me in this regard ?

Activity icon

Replied to FullCalendar In Laravel 7

Thanks @silencebringer . Your tutorial is using JavaScript to show Calendar. But I need a Laravel way to display Calendar. Thanks.

Activity icon

Replied to FullCalendar In Laravel 7

Thanks @silencebringer . Which package can I use in this regard ? Thanks.

Activity icon

Started a new Conversation FullCalendar In Laravel 7

I am trying to use this package with Laravel 7. But I am getting below error message.

error

How can I add this package to Laravel 7 ?

Jul
29
6 days ago
Activity icon

Replied to Google Calendar

Thanks @bobbybouwmann for your reply. I found below lines in (https://packagist.org/packages/spatie/laravel-google-calendar)

Save the json inside your Laravel project at the location specified in the service_account_credentials_json key of the config file of this package. Because the json file contains potentially sensitive information, I don't recommend committing it to your git repository.

Could you please say where can I Save the JSON file ?

Thanks

Jul
28
1 week ago
Activity icon

Started a new Conversation Google Calendar

How to display Google Calendar using this package (https://packagist.org/packages/spatie/laravel-google-calendar) ?

I am looking for step by step tutorial.

Jul
27
1 week ago
Activity icon

Replied to Query Not Meeting Requirement

Thanks @marianomoreyra. Great Reply. Thanks.

Activity icon

Replied to Query Not Meeting Requirement

Thanks @marianomoreyra for your reply. Yes, I am passing 'c' on $request->letter. I can see user id 1 in user_id column 4 times. But I am getting 3 records. Why I am getting 3 records ? I should get 4 records. Thanks.

Jul
26
1 week ago
Activity icon

Started a new Conversation Query Not Meeting Requirement

My Query is like below

$addressess = Address::where('first_name', 'LIKE', $request->letter.'%')->where('user_id', Auth::id())->get();

My Table is like below

Table

My result is like below

Result

Why I am not getting all the records of user_id 1 ?

I am getting 1 record less.

Jul
25
1 week ago
Activity icon

Started a new Conversation Fetch Null Values In Laravel Query

In my Laravel application if I use below query I am getting all values including null values.

    Address::query();

But if I use below Query I am getting values from first_name starts with certain character and other columns value is not null.

    Address::where('first_name', 'LIKE', $request->letter.'%')->get();

I would like to fetch values from first_name column starts with certain character and other columns value is null or not null both.

Thanks

Jul
24
1 week ago
Activity icon

Replied to Function Argument Is Not Available Inside AJAX Request

Thanks @tutanramon .I am using DataTable. Here is the AJAX part.

$('#address_datatable').DataTable({
                language: {
                    processing: `<div class='spinner-border' style='width: 3rem; height: 3rem;' role='status'><span
                        class='sr-only'>Loading...</span></div>`,
                },
                order: [],
                columnDefs: [{
                    "targets": [0],
                    "orderable": false
                }],
                processing: true,
                serverSide: true,
                ajax: '{{ route('show.addresses') }}',
                columns: [
                    {   data: 'initial', name: 'initial', orderable: false, searchable: false   },
                    {   data: 'company_name', name: 'company_name'  },
                    {   data: function(value){
                            return value.first_name + ' ' + value.last_name;
                        },
                        name: 'name'
                    },
                    {   data: 'main_email', name: 'main_email'  },
                    {   data: 'contact_number_1', name: 'contact_number_1'  },
                    {   data: 'action', name: 'action', orderable: false, searchable: false },
                ]
            });
Activity icon

Started a new Conversation Function Argument Is Not Available Inside AJAX Request

May be I could not express my issue properly in title. I am sorry for that.

I have below code

public function showAddresses(Request $request, $letter= null)
{
        if ($request->ajax()) {
           Log::info($letter);    //$letter  is not available 
        }
}

$letter is not available inside AJAX call.

Jul
23
1 week ago
Activity icon

Replied to Find Out Values Started With Certain Character From Database

Thanks @martinbean . I am expecting a value Paul but I am getting all the values of the column. Thanks.

Activity icon

Started a new Conversation Find Out Values Started With Certain Character From Database

I am trying to find out values started with certain character from database using below code. I am using DataTable.

return Datatables::of(Address::where('first_name', 'LIKE', $letter.'%')->get())
->addIndexColumn()
->addColumn('action', function(){
return
'<a href="">
    <i class="fa fa-pencil" aria-hidden="true"></i>
</a>
<a href="">
    <i class="fa fa-trash" aria-hidden="true"></i>
</a>';
})
->rawColumns(['initial','action'])
->make(true);

But my code is not working. I am getting different value than expected value.

Jul
22
1 week ago
Activity icon

Started a new Conversation Error In PHP And HTML Code Mix

I am using (https://yajrabox.com/docs/laravel-datatables/master) datatable. I am using in below code to add a coloumn. But I am getting only consignee text.

->addColumn('action', function($row){ return '<div title='.$row->assignee ? "Consignee" : "Customer".' class='.$row->assignee ? "consignee" : "customer".'>C</div>'; })

Jul
17
2 weeks ago
Activity icon

Replied to Execution Flow

Thanks @siangboon . I followed your instruction and it is working. But I need to know How it was working previously. Thanks.

Jul
16
2 weeks ago
Activity icon

Started a new Conversation Execution Flow

How to debug execution flow of a Laravel application where public folder is absent ?

My project structure is like below.

https://i.stack.imgur.com/UNevr.png

Activity icon

Replied to Php Artisan Serve Is Not Working

Thanks @chr15k . There is no public directory in this project. What is the solution to run this project ? Thanks.

Activity icon

Started a new Conversation Php Artisan Serve Is Not Working

I am working on a laravel project. Project file structure is like below.

https://i.stack.imgur.com/Cmi9h.png

If I run php artisan serve then I am getting below output.

https://i.stack.imgur.com/A65Eo.png

What is the solution ?

Apr
19
3 months ago
Activity icon

Replied to Your Requirements Could Not Be Resolved To An Installable Set Of Packages.

Thanks @snapey . I tried several ways but could not solve the issue so far.

https://i.stack.imgur.com/TbHDI.png

My composer.json is like below

"require": {
		"php": "^7.1.3",
		"aws/aws-sdk-php": "~3.0",
		"bedigit/lara-recaptcha": "^1.0",
		"bedigit/laravel-omnipay": "2.3.0",
		"bedigit/omnipay-2checkout": "dev-master",
		"bedigit/omnipay-payu": "dev-master",
		"chriskonnertz/open-graph": "~1",
		"cocur/slugify": "^2.3",
		"creativeorange/gravatar": "~1.0",
		"cviebrock/eloquent-sluggable": "^4.0",
		"doctrine/dbal": "^2.5",
		"fideloper/proxy": "^4.0",
		"florianv/laravel-swap": "^2.0",
		"graham-campbell/flysystem": "^5.0",
		"guzzlehttp/guzzle": "6.*",
		"intervention/image": "^2.3",
		"jackiedo/dotenv-editor": "1.*",
		"jaybizzle/crawler-detect": "1.*",
		"jaybizzle/laravel-crawler-detect": "1.*",
		"jenssegers/date": "^3.2",
		"lab404/laravel-impersonate": "^1.2",
		"laracasts/flash": "^3.0",
		"laravel-notification-channels/twilio": "^2.0",
		"laravel/framework": "5.8.*",
		"laravel/nexmo-notification-channel": "^2.0",
		"laravel/passport": "^7.0",
		"laravel/slack-notification-channel": "^2.0",
		"laravel/socialite": "^4.0",
		"laravel/tinker": "^1.0",
		"laravelcollective/html": "^5.3.0",
		"league/csv": "^9.1",
	  	"league/flysystem-aws-s3-v3": "^1.0",
	  	"league/flysystem-cached-adapter": "^1.0",
	  	"league/flysystem-sftp": "^1.0",
		"livecontrol/eloquent-datatable": "^0.1.5",
		"mcamara/laravel-localization": "1.3.*",
		"mews/purifier": "~2.0",
	  	"mhetreramesh/flysystem-backblaze": "^1.5",
		"omnipay/paypal": "[email protected]",
		"omnipay/stripe": "[email protected]",
		"php-http/guzzle6-adapter": "^1.1",
		"php-http/message": "^1.6",
		"predis/predis": "~1.0",
		"prologue/alerts": "^0.4.0",
		"propaganistas/laravel-phone": "4.*",
		"pulkitjalan/geoip": "2.*",
		"spatie/laravel-backup": "^5.0",
		"spatie/laravel-cookie-consent": "^2.2",
		"spatie/laravel-feed": "^2.0",
	  	"spatie/flysystem-dropbox": "^1.0",
		"spatie/laravel-permission": "^2.37.0",
		"torann/laravel-meta-tags": "^3.0",
		"unicodeveloper/laravel-password": "1.0.*",
		"unicodeveloper/laravel-paystack": "1.0.*",
		"watson/sitemap": "2.0.*"
	},

I couldn't check Laravel version also

https://i.stack.imgur.com/psiTL.png

Activity icon

Started a new Conversation Your Requirements Could Not Be Resolved To An Installable Set Of Packages.

I am getting below error when I am running composer install command.

https://i.stack.imgur.com/yucHT.png

I used "bedigit/laravel-omnipay": "^7.0", is in my composer.json file but it couldn't solve the issue.

Apr
07
3 months ago
Activity icon

Replied to Could Not Open Input File: Artisan

This command is for creating new project.

Activity icon

Started a new Conversation Could Not Open Input File: Artisan

I downloaded a Laravel project from cPanel. I run composer update command. But I am getting error like below.

https://i.stack.imgur.com/m8PTh.png

Mar
15
4 months ago
Activity icon

Started a new Conversation Google Captcha Validation Message.

I am working with Google Captcha. My validation code in controller is like below

$this->validate($request,[
        'name' => 'required',
        'email' => 'required|email',
        'message' => 'required',
        'g-recaptcha-response' => 'required|captcha'
    ]);

My view code for Captcha showing and validation message showing is like below

               <div class="row">
                    <div class="col" style="margin-top:20px">
                        {!! Captcha::display() !!}
                        {{ html()->hidden('captcha_status', 'true') }}
                    </div><!--col-->
                </div><!--row-->

                @if ($errors->has('g-recaptcha-response'))
                    <span class="help-block text-danger">{{ $errors->first('g-recaptcha-response') }}</span>
                @endif

I am getting message like below

https://i.stack.imgur.com/esNeW.png

How can I get a nicely formatted message ?

Feb
27
5 months ago
Activity icon

Replied to Mcrypt PHP Extension Required

Thanks @sinnbeck . Your solution is working. Thanks.

Feb
26
5 months ago
Feb
24
5 months ago
Activity icon

Replied to Mcrypt PHP Extension Required

Thanks @sauravs012 . Sorry your solution is not working. Thanks.

Activity icon

Replied to Mcrypt PHP Extension Required

Thanks @sinnbeck . Sorry your solution is not working. Thanks.

Activity icon

Replied to Laravel Structure

Thanks @sti3bas. How can I run this laravel project ?

Activity icon

Started a new Conversation Laravel Structure

Is it a Laravel Project Structure ?

https://i.stack.imgur.com/M6D6y.png

Activity icon

Started a new Conversation Mcrypt PHP Extension Required

I am trying to run below project in my localhost.

https://i.stack.imgur.com/HzKLb.png

My PHP configuration is like below

https://i.stack.imgur.com/iRwDT.png

I am trying to run php artisan --version command. I am getting below error

https://i.stack.imgur.com/TaYkL.png