afoysal

afoysal

Member Since 4 Years Ago

Experience Points
14,620
Total
Experience

380 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 3
14,620 XP
Apr
19
1 month 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
1 month 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
2 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
3 months ago
Activity icon

Replied to Mcrypt PHP Extension Required

Thanks @sinnbeck . Your solution is working. Thanks.

Feb
26
3 months ago
Feb
24
3 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

Feb
21
3 months ago
Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @philamne . Here is my composer.json.

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
    "framework",
    "laravel"
],
"license": "MIT",
"require": {
    "php": "^7.1.3",
    "doctrine/dbal": "^2.9",
    "fideloper/proxy": "^4.0",
    "guzzlehttp/guzzle": "^6.3",
    "intervention/image": "^2.4",
    "laravel/framework": "5.7.*",
    "laravel/tinker": "^1.0",
    "laravelcollective/html": "^5.7",
    "predis/predis": "^1.1",
    "spatie/laravel-permission": "^2.32",
    "unisharp/laravel-ckeditor": "^4.7"
},
"require-dev": {
    "beyondcode/laravel-dump-server": "^1.0",
    "filp/whoops": "^2.0",
    "fzaninotto/faker": "^1.4",
    "mockery/mockery": "^1.0",
    "nunomaduro/collision": "^2.0",
    "phpunit/phpunit": "^7.0"
},
"config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
},
"extra": {
    "laravel": {
        "dont-discover": []
    }
},
"autoload": {
    "psr-4": {
        "App\": "app/"
    },
    "classmap": [
        "database/seeds",
        "database/factories"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Tests\": "tests/"
    }
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
    "post-autoload-dump": [
        "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate --ansi"
    ]
}

}

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @philamne . I tried for last 2 days. How can I exchange TeamViewer credentials ? Thanks.

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

What would you like to do ?

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @siangboon . Result is as like before. Thanks.

Feb
20
3 months ago
Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @sinnbeck . error.log is empty. My route is like below which I found in web.php

Route::view('/', 'common/web/wordpress');

View folder structure is like below

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

I found below code in wordpress.blade.php

  <?php
       echo file_get_contents('https://mallorcavilla-book.com');
  ?>

I am getting 500 error like below

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

Laravel storage/logs/ folder is empty

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

'/var/log/apache2/' folder is also empty

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

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @siangboon . I check laravel log in torage/logs/ but it is empty. Thanks.

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @snapey . I made permissions 777 for whole laravel repository. Thanks.

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @siangboon . Here is php version https://i.stack.imgur.com/RHTJU.png. The application is ridiculous. Application has 2 folder. 1 is zain_web and another is zain_api. Both has Laravel folder structure. It is a clients application. I am trying to install it in my local machine. Thanks.

Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @sinnbeck . I don't know which one is throwing error. It is a ridiculous Laravel application.

Feb
19
3 months ago
Activity icon

Replied to 500 Error In Laravel But Log Folder Is Empty

Thanks @talinon for your reply. My config/logging.php is like below

<?php

use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler;

return [

/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/

'default' => env('LOG_CHANNEL', 'stack'),

/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
|                    "errorlog", "monolog",
|                    "custom", "stack"
|
*/

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['daily'],
        'ignore_exceptions' => false,
    ],

    'single' => [
        'driver' => 'single',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
    ],

    'daily' => [
        'driver' => 'daily',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
        'days' => 14,
    ],

    'slack' => [
        'driver' => 'slack',
        'url' => env('LOG_SLACK_WEBHOOK_URL'),
        'username' => 'Laravel Log',
        'emoji' => ':boom:',
        'level' => 'critical',
    ],

    'papertrail' => [
        'driver' => 'monolog',
        'level' => 'debug',
        'handler' => SyslogUdpHandler::class,
        'handler_with' => [
            'host' => env('PAPERTRAIL_URL'),
            'port' => env('PAPERTRAIL_PORT'),
        ],
    ],

    'stderr' => [
        'driver' => 'monolog',
        'handler' => StreamHandler::class,
        'formatter' => env('LOG_STDERR_FORMATTER'),
        'with' => [
            'stream' => 'php://stderr',
        ],
    ],

    'syslog' => [
        'driver' => 'syslog',
        'level' => 'debug',
    ],

    'errorlog' => [
        'driver' => 'errorlog',
        'level' => 'debug',
    ],
],

];

Below line is in my .env file

LOG_CHANNEL=stack

Activity icon

Started a new Conversation 500 Error In Laravel But Log Folder Is Empty

I am working in a Client's Laravel project which version is 5.7.28. But I am not getting anything in storage/logs/ folder. I copied the .env.example to .env. I run composer install and php artisan key:generate. Some of my .env files configuration is like below

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:8ovbzfpWGsGTDyDIRWDO8VKObeXGyWqnMVw5KjTVJTc=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
BASE_URL=http://127.0.0.1:8000

I set permission 777 for all folders.

But I am getting 500 error. How can I solve the error.

Feb
17
3 months ago
Activity icon

Replied to Database [multiblog] Not Configured.

Thanks @sinnbeck , Finally it works with your command WINK_DB_CONNECTION=mysql.

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

Activity icon

Replied to Database [multiblog] Not Configured.

Thanks @sinnbeck , I am not caching anything. I just install Laravel and trying to install that package. I run that command thinking that cache can create any issue. I run your commands. Result is as like before.

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

Activity icon

Replied to Database [multiblog] Not Configured.

Thanks @sinnbeck for your reply. I run php artisan migrate. Result it same as like before.

https://i.stack.imgur.com/3XgVl.png

Activity icon

Started a new Conversation Database [multiblog] Not Configured.

I am trying to install this package https://github.com/writingink/wink?fbclid=IwAR3SxfQsnv1vFIkQKuyi-t_X8-T1FAeawDyBA6KyL7jwj108NDhme3JhOs8.

My .env files code is like below

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=multiblog DB_USERNAME=root DB_PASSWORD=

My config/database.php files code is like below

'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'multiblog'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ],

I am trying to run below command

    php artisan wink:install

I am getting below error

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

Jan
19
4 months ago
Activity icon

Replied to Logout In Laravel Application

What should I do in this regard ?

Activity icon

Started a new Conversation Logout In Laravel Application

I am making a database value 0 when user is logout from my application. How can I make it 0 when user close the Tab or close the browser ?

Jan
17
4 months ago
Activity icon

Replied to Correct Query

@snapey Sorry your solution is not working. Thanks,

Activity icon

Replied to Correct Query

Thanks @b-rian . I am trying to use your Query. But it is not working. Thanks.

Activity icon

Replied to Correct Query

Thanks @snapey . Do you have any suggestion ? Yes, $request->clock_in is correct.

Activity icon

Replied to Correct Query

@snapey , yes, I am trying to do so. Thanks.

Activity icon

Started a new Conversation Correct Query

I am doing clock in and clock out. In this regard I would like to insert clock out time of user where the clock in time is already inserted. My query is like below.

    DB::table('clocks')
            ->where('user_id', Auth::user()->id)
            ->latest('created_at ')->first()
            ->update(array('clock_out' => $request->clock_in));

Is it correct query ?

Jan
16
4 months ago
Activity icon

Started a new Conversation Use App\User;

I used use App\User; in my HomeController. My function code is like below

if($clock->save()){
            $user = new User();
            $user->attendence = 1;
            $user->save();
    }

I am getting below error.

[2020-01-16 10:33:42] debug.ERROR: Class 'App\Http\Controllers\User' not found {

Jan
15
4 months ago
Activity icon

Started a new Conversation Error In Php Artisan Route:cache

My api.php code is like below

Route::middleware('auth:api')->get('/user', function (Request $request) {
        return $request->user();
});

I tried to run php artisan route:cache and getting error like below

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

Jan
14
4 months ago
Activity icon

Replied to Save Date Value In Database

Thanks @willvincent . Your solution is not working. Thanks

Activity icon

Replied to Save Date Value In Database

@sirik I tried this but it is not working.

Activity icon

Started a new Conversation Save Date Value In Database

I am trying to save date value in Database. I set MySql column type timestamp. My controller code is like below

$seller->license_date = date("Y-m-d", strtotime($request->license_date));

Others data is saving but Date is not saving in Database.

Jan
13
4 months ago
Activity icon

Started a new Conversation PHP Version

What is the PHP version for Laravel 5.7.28 ?