dembilesmana

dembilesmana

Member Since 5 Months Ago

Experience Points
730
Total
Experience

4,270 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
1
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 1
730 XP
Apr
04
5 days ago
Activity icon

Awarded Best Reply on Failed To Install Composer And Laravel (macports)

solved, by installing a few of these packages : php74-curl, php74-mbstring, php74-openssl, php74-posix, php74-zip.

Activity icon

Replied to Failed To Install Composer And Laravel (macports)

solved, by installing a few of these packages : php74-curl, php74-mbstring, php74-openssl, php74-posix, php74-zip.

Apr
03
6 days ago
Activity icon

Replied to Failed To Install Composer And Laravel (macports)

I installed everything but there are still errors

PHP Warning:  copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1

Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1
PHP Warning:  copy(): Failed to enable crypto in Command line code on line 1

Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

Activity icon

Replied to Failed To Install Composer And Laravel (macports)

When I was browsing I just got an answer to change the php.ini file but nothing happened.

Activity icon

Replied to Failed To Install Composer And Laravel (macports)

Oh, I forgot to ask, is it different from openssl from php^-openssl, or is it related to each other?

and do I not need to do an extension to php.ini? and is changing the php.ini file recommended? and the php.ini function for what? because before I was browsing and many answers to eliminate the semicolons in extension = openssl. but nothing happened

Activity icon

Replied to Failed To Install Composer And Laravel (macports)

still gets the same error message when installing composer

PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1
Activity icon

Started a new Conversation Failed To Install Composer And Laravel (macports)

Previously I used the hombrew package manager, everything was okay. I reinstalled my iMac, and now I use the Macports package manager.

first I installed the composer and it worked, then installed laravel but failed:

  Problem 1
    - laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1]

then I installed the latest version of php using macports, but when I installed the laravel I got this message :

Changed current directory to /Users/DELE/.composer

PHP Fatal error:  Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:713
Stack trace:
#0 phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(48): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth('  [Composer\Exc...', 'ASCII')
#1 phar:///Users/DELE/composer.phar/vendor/symfony/console/Helper/Helper.php(54): mb_strwidth('  [Composer\Exc...', 'ASCII')
#2 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(646): Symfony\Component\Console\Helper\Helper::strlen('  [Composer\Exc...')
#3 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///Users/DELE/composer.phar/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringI in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 713

Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:713
Stack trace:
#0 phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(48): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth('  [Composer\Exc...', 'ASCII')
#1 phar:///Users/DELE/composer.phar/vendor/symfony/console/Helper/Helper.php(54): mb_strwidth('  [Composer\Exc...', 'ASCII')
#2 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(646): Symfony\Component\Console\Helper\Helper::strlen('  [Composer\Exc...')
#3 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///Users/DELE/composer.phar/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringI in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 713

then I tried to reinstall the composer and get this message :

PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Please help.

Mar
28
1 week ago
Activity icon

Replied to How Resolve Route [verification.verify] Not Define?

Because I have a router admin that also uses auth::routes().

so I made the admin and client models. I separate it from the subdomain admin.app.dev and client.app.dev, where each subdomain has a login and register form for clients only.

is there a solution for that?

Activity icon

Replied to How Resolve Route [verification.verify] Not Define?

I understand, but is there no other way like using 'trait' maybe?

or if I make a special notification to replace it can it? if yes how to call it, I have repeatedly read the documentation about the notification but do not understand how to apply it to the problem I am facing this.

Activity icon

Replied to How Resolve Route [verification.verify] Not Define?

thank you for answering, but the purpose of my question is how can I change the value of URL::temporarySignedRoute('verification,verify', <-- change this ....).

because by default laravel calls a route 'verification.verify' whereas I have that route with the prefix name client:: be like this 'client::verification.verify'. because auth::routes() I wrap it in a group with name 'client::'.

Mar
27
1 week ago
Activity icon

Started a new Conversation How Resolve Route [verification.verify] Not Define?

how to change route verification.verify value in laravel?

protected function verificationUrl($notifiable)
{
	return URL::temporarySignedRoute(
		'verification.verify', // Change this in laravel?
		Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
		[
			'id' => $notifiable->getKey(),
			'hash' => sha1($notifiable->getEmailForVerification()),
		]
	);
}

because my route is like this:

Route::domain(config('app.client'))->namespace('client')->name('client::')->group(function () {
    Auth::routes(['verify' => true]);

    Route::middleware(['auth:client', 'verified'])->group(function () {
        Route::get('/', '[email protected]')->name('home');
        Route::get('paying', '[email protected]')->name('paying');
        Route::get('profile', '[email protected]')->name('profile');
        Route::post('profile', '[email protected]')->name('profile.update');
    });
});

so I have the name of the route client::verification.verify not verification.verify

how do i resolve this?

Mar
23
2 weeks ago
Activity icon

Replied to How To Login With Different Models In Laravel?

I just got the answer at https://medium.com/@nasrulhazim/laravel-using-different-table-and-guard-for-login-bc426d067901

I will digest your answer first

thanks for the answer, you are the best.

Activity icon

Replied to How To Login With Different Models In Laravel?

yes I understand, but I want to separate the client model and the admin model. is there no way to do that in laravel?

and I do not have access to laracast series :(

Activity icon

Started a new Conversation How To Login With Different Models In Laravel?

I have tried to solve this problem for a few days and haven't resolved it yet, hehehe. so please help the masters here please help.

First I change the name user.php to client.php.

Then I made a new model named admin.php.

then in the app/auth.php file I change it to be like this:

    'defaults' => [
        'guard' => 'client',
        'passwords' => 'clients',
    ],

    'guards' => [
        'client' => [
            'driver' => 'session',
            'provider' => 'clients',
        ],

        'admin' => [
            'driver' => 'session',
            'provider' => 'admins',
        ],
    ],

    'providers' => [
        'clients' => [
            'driver' => 'eloquent',
            'model' => App\Client::class,
        ],

        'admins' => [
            'driver' => 'eloquent',
            'model' => App\Admin::class,
        ],
    ],

    'passwords' => [
        'clients' => [
            'provider' => 'clients',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],

        'admins' => [
            'provider' => 'admins',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
    ],

and this LoginController.php:

    public function __construct()
    {
        $this->middleware('guest')->except('logout');
    }

    public function showLoginForm()
    {
        return view('admin.auth.login');
    }

    protected function guard()
    {
        return Auth::guard('admin');
    }

then I tried to log in, and the result was session set, but displaying the login page again (no login failed) it's just that I was not directed to the home page

then I change the auth.php file:

    'defaults' => [
        'guard' => 'admin',
        'passwords' => 'admins',
    ],

then I open http://app.dev/login and I am immediately directed to the homepage, which means I have successfully logged in with a session that was previously saved.

the question: how to login with different models in laravel? or where/how is Illuminate\Foundation\Auth\AuthenticatesUsers; call the defaults array value?

Mar
22
2 weeks ago
Activity icon

Replied to How AuthenticateUsers Trait From Laravel Built-in Authentication Communicate With User Model?

Has this discussion come to light? because I also stuck here.

Mar
18
3 weeks ago
Activity icon

Started a new Conversation Direct Each Route('register') To The Domain That Is Currently Being Accessed

I made a multi-app with a codebase style,

I have a problem if I open the login page at admin.app.dev/login the link to register leads to client.app.dev/register that should lead to admin.app.dev/register.

public function map()
{
	$this->mapAdminRoutes();
	$this->mapClientRoutes();
}

protected function mapAdminRoutes()
{
	Route::domain('admin.app.dev')
		->middleware('web')
		->namespace($this->namespace)
		->group(base_path('routes/admin.php'));
}

protected function mapClientRoutes()
{
	Route::domain('client.app.dev')
		->middleware('web')
		->namespace($this->namespace)
		->group(base_path('routes/client.php'));
}

routes/admin.php

Auth::routes();

routes/client.php

Auth::routes();

views/auth/login.blade.php

<a href="{{ route('register') }}">Register</a>

// the link only refers to the route that was last called.
// client.app.dev/register

I want to direct each route('register') to the domain that is currently being accessed

Please help.

Mar
11
4 weeks ago
Activity icon

Replied to Multi-tenancy Using Laravel App

similarly, I also find it very difficult to understand the tenancy.dev documentation. :(

Mar
09
1 month ago
Activity icon

Started a new Conversation Authenticated Users Are Directed To The Subdomain.

by default the user who successfully logged in will be directed to test.dev/home.

I want to be directed to subdomain.test.dev.

and if the user is not authenticated accessing subdomain.test.dev will be directed to test.dev/login

how do i do that in laravel?

Oct
24
5 months ago
Activity icon

Replied to Test The Account Users In The Database

yes, now i'm trying it. thank you for your answer :)

Activity icon

Replied to Test The Account Users In The Database

thank you for the answer, but that doesn't seem to be my intention.

what I mean is to test the connection to the database, which I got like this:

if (DB::connection()->getPdo() == TRUE) {
    echo "Connection to database successful";
} else {
    echo "Connection to database failed";
}

but the code above directly retrieves data from the .env file, which causes if there is an error in the user and password cannot handle (SQLSTATE[HY000] [1045] Access denied for user 'testuser'@'localhost' (using password: YES)).

I want:

('test the connection to the database with a user and password') ? 'proceed to the next stage' : 'Enter the correct user and password';

can i test it first like the code above, before i put it in the .env file?

Activity icon

Started a new Conversation Test The Account Users In The Database

I want to test the account users in the database (not the users in the table). so basically I can make a database with php.

how to do that in laravel?

Oct
15
5 months ago
Activity icon

Replied to Multi-website With One System

I have multiple applications.

as I asked above, multi-website / multi-application with only one system folder (as I did in codeigniter).

Activity icon

Replied to Multi-website With One System

because I feel it's more organized, similar to hmvc even though it's bad practice.

what i know is using php.

I'm thinking of dividing it into 2 applications on one hosting. but in my opinion it will take up a lot of storage. I want to keep storage capacity to a minimum.

What kind of configuration is implemented in Apache?

Activity icon

Replied to Multi-website With One System

after I read, in my opinion still only for the same content.

what I mean by the same content is the folder and route files, public, source, etc. in the same folder. I do not want that.

Activity icon

Replied to Multi-website With One System

hahaha it's okay, it's very helpful for me.

Activity icon

Replied to Multi-website With One System

but isn't that only for the same content?

When I am codeigniter, I differentiate content by configuring the index.php file to the application folder for each domain.

Activity icon

Replied to Multi-website With One System

The above article is for subdomains. can it be implemented with multiple main-domains?

Activity icon

Replied to Multi-website With One System

Thank you for the advice. I will see and learn it first :)

Activity icon

Started a new Conversation Multi-website With One System

first when i was in codeigniter i used this method to be able to multi-website with one system.

file index.php codeigniter:

$system_path = 'system';

if ($_SERVER['HTTP_HOST'] == 'administrator.localhost1.com') {
    $application_folder = 'administrator/application';
}

if ($_SERVER['HTTP_HOST'] == 'affiliate.localhost1.com') {
    $application_folder = 'affiliate/application';
}

if ($_SERVER['HTTP_HOST'] == 'localhost2.com') {
    $application_folder = 'content/application';
}

my directory codeigniter:

|--- administrator/
|--- affiliate/
|--- content/
|--- system/
|--- index.php

what I want to ask is:

  1. Is this practice good if I implement it on a website?
  2. if yes how do i implement it or if there are other ways please let me know.

Thank you.