sohelamin

sohelamin

Member Since 4 Years Ago

Dhaka

Software Engineer at AppzCoder

Experience Points 22,185
Experience Level 5

2,815 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 257
Lessons
Completed
Best Reply Awards 0
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.

08 Feb
2 years ago
13 Jan
2 years ago

sohelamin left a reply on Laravel Modular Series

@justkidding96 Actually I don't want to use any third party package to do that structure better I want to know the best approach.

sohelamin started a new conversation Laravel Modular Series

Hi @Jeffrey,

The laracasts series are amazing no doubt to that. One more request from me is, if you do a series based on "How to handle modules for large scale application in a best way in laravel" would be much appreciated :)

Thanks

15 Jun
3 years ago

sohelamin started a new conversation Laravel Admin Panel

I've build a simple admin panel package based on my crud generator.

https://github.com/appzcoder/laravel-admin

Please share your feedback on it :)

13 Jun
3 years ago
03 Apr
3 years ago

sohelamin started a new conversation About "laravelcollective/html" Package.

Guys How many of you are prefer to use HTML/FORM helper instead of plain form in laravel? In my crud generator package I've required "laravelcollective/html" Now I want to decouple it from my package. Any suggestion or idea about this?

My package is: https://github.com/appzcoder/crud-generator

25 Mar
3 years ago

sohelamin left a reply on Eloquent Best Practices

Yup I prefer to use everywhere like

User::where('status', 1)->get();

Also I use Model as repository through constructor inject. But for one of our project cases we use eloquent (outside laravel) and I just wanna to confirm from you if it is okay with the both codes as I mentioned.

$user = new App\User;
$user->where('status', 1)->get();

// I do
App\User::where('status', 1)->get();
24 Mar
3 years ago

sohelamin started a new conversation Eloquent Best Practices

Hi,

Is it best practice if I instantiate a empty model in my controller without using any repository like below?

class UserController extends Controller
{

    protected $users;

    public function __construct()
    {
        $this->users = new App\User;
    }

}

And one of my teammate used to instantiate model for building the queries like below:

$user = new App\User;
$user->where('status', 1)->get();

// I do
App\User::where('status', 1)->get();

So my question is what is the best practice or best way ? Please share your experience on it.

23 Jan
3 years ago

sohelamin left a reply on CRUD

Hi, You could do this as:

public function store(Request $request)
{
    YourModel::create($request->all());
}
``

And if you need Crud Generator then you can try https://github.com/appzcoder/crud-generator
It's really so simple :)
28 Dec
3 years ago

sohelamin left a reply on JWT-Token: Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' Not Found

Where did you get the errors? If you are getting the errors in console then run

composer update --no-scripts
composer update

sohelamin left a reply on JWT-Token: Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' Not Found

Install the package by followed this https://github.com/tymondesigns/jwt-auth/wiki/Installation

Maybe you included service provider before installing the package.

sohelamin started a new conversation Server Requirements For Laravel App

Hey Guys,

I've laravel application where I've implemented OAuth server including below stuffs:

  • 2 Redis Instances
  • NodeJS
  • Socket
  • Supervisor

My main purpose is event real-time broadcasting and job queuing with redis.

Please let me suggest some server requirements to host the app. Currently it is hosted on digital ocean 512 MB droplet but seems it is over killing the infrastructures.

24 Dec
3 years ago

sohelamin left a reply on Laravel 5 Generators Extended

Great work indeed :)

For this purpose I had to develop a package myself earlier https://github.com/appzcoder/crud-generator

sohelamin left a reply on Laravel CRUD Generator

Hi,

You can do this simply with "appzcoder/crud-generator" For this you just need to define the field type on the artisan command and the generator will generate everything eg: the form's field and the database fields for you.

Check this https://github.com/appzcoder/crud-generator#crud-command and https://github.com/appzcoder/crud-generator#supported-field-types

22 Dec
3 years ago

sohelamin left a reply on Oauth2 Login Redirect

If you are telling about to redirect back to client side from laravel app then you could store the redirect uri at the first time hit on laravel app and you can check the session to redirect back.

I did in one of my project for this case, I store the uri in session for 2/3 request with middleware.

17 Dec
3 years ago

sohelamin started a new conversation Console Package Unit Testing

Hi Guys,

I have a laravel console based package (artisan command based) which I need to add phpunit test cases. For this do I need to require the full laravel package to do that? or how do you manage in this case?

16 Dec
3 years ago

sohelamin left a reply on Is There Any Way To Store A Session For Only 2/3 Request?

Thanks @bobbybouwmann for the idea.

I was also looking for if this can be done via http header like ThrottleRequests in laravel 5.2 or via caching the limit :)

sohelamin started a new conversation Is There Any Way To Store A Session For Only 2/3 Request?

Hi,

I want to register a session and want to forget it if there any 2 or 3 http request occurs.

15 Dec
3 years ago

sohelamin left a reply on Anyone Used Redis As Queueing And Broadcasting Driver At Same Time?

Actually I did the Redis things manually rather than depending on the event broadcasting. Like:

// Redis Publish
$redis = Redis::connection('pubsub');
$data = [
    'event' => 'App\\Events\\UserRegisteredEvent',
    'data' => [
        'name' => $user->name,
    ],
];
$redis->publish('user-register-channel', json_encode($data));

For now I need thing is done :) I will find a better solution. Please let me know if you will get something. Thanks

sohelamin left a reply on Anyone Used Redis As Queueing And Broadcasting Driver At Same Time?

Fixed it by instantiating new redis client with different connection. Eg:

$redis = Redis::connection('pubsub');

But it will be better if we could select the connection while broadcasting the event.

sohelamin left a reply on Anyone Used Redis As Queueing And Broadcasting Driver At Same Time?

Yes I've tried with multiple redis instances eg: port 6379 & 6380 but no luck.

I ran 'redis-cli monitor' command and somehow laravel does not use multiple connection as I configured in database.php

14 Dec
3 years ago

sohelamin started a new conversation Any Use Redis As Queue And Broadcast Driver Same Time?

Hi,

Any one used redis as broadcasting and queuing drive at the same time? I tried with both driver and it was not working it only working if I choose redis for only one driver.

Eg:

QUEUE_DRIVER=redis
BROADCAST_DRIVER=redis

Even I've tried different redis connection in database configuration as below:

    'redis' => [

        'cluster' => false,

        'default' => [
            'host' => '127.0.0.1',
            'port' => 6379,
            'database' => 0,
        ],
        'pubsub' => [
            'host' => '127.0.0.1',
            'port' => 6380,
            'database' => 0,
        ],
    ],

Please let me help. 
Thanks
13 Dec
3 years ago

sohelamin left a reply on Redis Problem While Using As Event Broadcasting & Queuing Driver

Here is the hints QUEUE_DRIVER=redis BROADCAST_DRIVER=redis

sohelamin started a new conversation Redis Problem While Using As Event Broadcasting & Queuing Driver

Hi Guys,

I'm experiencing issue with redis when I use redis for both event and the queue driver. Is there any tweak or trick to fix it.

08 Dec
3 years ago

sohelamin left a reply on Same Job With Multiple Queue With Params

Yes I want to dispatch the "SyncSitePosts" job 5 times with different parameter.

sohelamin started a new conversation Same Job With Multiple Queue With Params

Hi,

I want remotely fetch data from other site to laravel site. Suppose the query having 100 records and I want to run the insert query in 5 times and that's why i need limit query as well.

eg:

$totalPages = 5;
$currentPage = 1;
$job = (new SyncSitePosts($currentPage))->delay(60);
$this->dispatch($job);

How can I run the same task as 5 times in queue with dynamic parameter?

02 Dec
3 years ago

sohelamin left a reply on Laravel5 CRUD Generator

Hey guys check this again https://github.com/appzcoder/crud-generator/ All awesome features are included. Let share some of your ideas to make it better.

15 Oct
3 years ago

sohelamin left a reply on Laravel5 CRUD Generator

You're most welcome @dudod :)

sohelamin left a reply on Laravel5 CRUD Generator

Thank @riat.a for your appreciation on this.

Actually I didn't included enum type field yet. Will add it on the next release.

24 Aug
3 years ago

sohelamin left a reply on Laravel5 CRUD Generator

Hello @sakara,

Have you tried with laravel 5.1+ with followed full instructions? You can check again with clearly following the instruction again I've just released a stable version. Also let me know if you still getting any errors with full screenshot.

Thanks

20 Aug
3 years ago

sohelamin left a reply on Is It Best Practice To Include A Package Config To Another Package Silently?

Thanks. I will leave it there whatever it is now.

sohelamin left a reply on Is It Best Practice To Include A Package Config To Another Package Silently?

@bobbybouwmann I did it as dependent the package "laravelcollective/html" for my main package "appzcoder/crud-generator" and told to user to include the service provider for the configuration. You can check it here https://github.com/appzcoder/crud-generator But peoples/users don't like to follow more instructions :( That's why I'm seeking an solution.

sohelamin started a new conversation Is It Best Practice To Include A Package Config To Another Package Silently?

Hi Guys,

I've a crud generator package "appzcoder/crud-generator" which has a dependency package "laravelcollective/html" as well. My issue is, will it best practice to use 2nd package service provider into my main package? so user should not need to configure the "laravelcollective/html" package or no need to include the service provider and the aliases.

Eg:

// Registering "laravelcollective/html" into "appzcoder/crud-generator"
if (!$this->app->bound('Collective\Html\HtmlServiceProvider')) {
    $this->app->register('Collective\Html\HtmlServiceProvider');
    $loader = \Illuminate\Foundation\AliasLoader::getInstance();
    $loader->alias('Form', 'Collective\Html\FormFacade');
    $loader->alias('HTML', 'Collective\Html\HtmlFacade');
}
16 Aug
3 years ago

sohelamin left a reply on Laravel5 CRUD Generator

Thanks @glenlockhart

I'm very glad that you liked it. Actually the route stuff had to leave for users. User will decide whatever they like. Let me know if you having any other issue.

Thanks Sohel Amin

sohelamin started a new conversation Laravel 5 Package Boilerplate

Hi,

This simple package boilerplate might help you to have some idea about package development. https://github.com/sohelamin/laravel-package-boilerplate

Thanks

sohelamin left a reply on What Is The Best Laravel 5.1 Generator?

If you're looking for a CRUD generator then you can check it https://github.com/appzcoder/crud-generator which one I made for simple CRUD operation with a single line command.

06 Jul
3 years ago

sohelamin left a reply on Middleware To Show Items Based On User Roles

Middleware Parameter can be supported in laravel 5.1 You can also use this package https://github.com/appzcoder/laravel-roles

sohelamin started a new conversation User Roles Manager

Just developed a Laravel 5 User Roles Manger. https://github.com/appzcoder/laravel-roles It is based on Jeffrey Way's https://github.com/laracasts/Users-and-Roles-in-Laravel

Though it has no ability to manage permission yet but It is very simple access any routes through checking user roles via middleware. Role can be pass via midleware parameter.

Please have a look and let me know your suggestion.

Thanks

sohelamin left a reply on Problem With Routes

Why did you use curly braces on the route name?

I think bellow codes must works.

Route::group(['prefix' => 'locale'], function () { Route::get('3d', 'FrontController@3d'); });

05 Jul
3 years ago

sohelamin started a new conversation Display Registered Routes List In Lumen Same As Laravel

Hello,

I've built a package for lumen to display the registered routes list in lumen via artisan comman.

https://packagist.org/packages/appzcoder/lumen-routes-list

Please check and leave your advice here.

25 Jun
4 years ago

sohelamin left a reply on CRUD With Lumen

Laravel 5 CRUD generator developed by me https://github.com/appzcoder/crud-generator You can use it to create a lumen generator no needed any boilerplate.

sohelamin left a reply on Add CRUD's Controller Method To A Controller

Here you can try https://github.com/appzcoder/crud-generator It's built my me. You just need to type a single line command which will create controller, model, migration, views for a complete CRUD operation.

sohelamin left a reply on Auto Build CRUD?

Here you can try https://github.com/appzcoder/crud-generator It's built my me. You just need to type a single line command which will create controller, model, migration, views for a complete CRUD operation.

15 Jun
4 years ago

sohelamin left a reply on Published My First Book

Excellent work @milon vai. You're one of the best laravel legend in our country :)

sohelamin left a reply on Any CRUD Generator In Laravel? Im Sick Of Copy The Same Shit

@jhosep412 you can try my CRUD generator which will let you generate everything with a single line command. Try and let me know your feedback. https://github.com/appzcoder/crud-generator

sohelamin left a reply on Laravel5 CRUD Generator

Hi @Mythos33 thanks for sharing your thought.

Okay I will make an options for artisan command. Also I've made the package Laravel 5.1 compatible.

Thanks, Sohel Amin

05 Jun
4 years ago

sohelamin left a reply on Laravel5 CRUD Generator

@itmanvn let me know your feedback. Cheers :)

10 May
4 years ago

sohelamin left a reply on CRUD Controller And Form Generation?

Here a crud generator for laravel5 which will generate for you controller, model, migration, views including form. https://github.com/appzcoder/crud-generator

Please use it and leave your feedback to make it better.