Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

rubenochoa

rubenochoa

Member Since 7 Months Ago

Experience Points
3,150
Total
Experience

1,850 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
5
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
3,150 XP
Oct
26
4 weeks ago
Activity icon

Replied to About Custom Messages Validation

@snapey After hours and days I am still working on. So your way is best for me but the only change is using array of rules followed by an array of messages? Cause it still not get the custom messages.

public function postSignup(Request $request){
        $this->validate($request, [
            'email' => 'required|string|email|max:255|unique:users|confirmed|exists:users',
            'password' => 'required|string|min:6|confirmed|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#[email protected]$%^&*-]).{6,}$/',
            'password_confirmation' => 'required|min:6',
            'phone' => 'required|regex:/[6-9]{10}/',
            'stathero' => 'numeric|regex:/[2-9]{10}/',
            'name' => 'required|max:12',
            'surname' => 'required|max:13',
            'city' => 'required|max:12',
            'address' => 'required|max:25',
            'zip' => 'required|numeric|min:5',
            'vatnumber' => 'nullable|regex:/(01)[0-8]{8}/'
        ],
        [
            'email.required' => 'Hey buddy, complete your email',
            'email.exists'=> 'Uer does not exist',
        ]
    ); 
Oct
24
1 month ago
Activity icon

Replied to About Custom Messages Validation

As about blade I have to change something?

@if(count($errors) > 0)
                <div class="alert alert-danger">
                    @foreach($errors->all() as $error)
                        <p>{{ $error }}</p>
                    @endforeach
                </div>
            @endif
Activity icon

Replied to About Custom Messages Validation

@michaloravec you mean

  $customMessages = [
            'email.required' => 'The :attribute field is required' to 'email.required' => trans('translated language'),
        ]; 
Activity icon

Replied to About Custom Messages Validation

@snapey for an example: 'email.required' => 'Hey buddy, complete your email', to 'email.required' => 'in Germany language',

Activity icon

Replied to About Custom Messages Validation

@snapey @michaloravec if I write the messages to another language will be the same?

Activity icon

Replied to About Custom Messages Validation

@snapey Months ago I was trying to solve this issue trying to do this and I messed up:

        $user = new User([
            'email' => $request->input('email'),
            'password' => bcrypt($request->input('password')),
            'token' => str_random(35),
            'phone' => $request->input('phone'),
            'stathero' =>$request->input('stathero'),
            'name' => $request->input('name'),
            'surname' => $request->input('surname'),
            'city' => $request->input('city'),
            'address'=> $request->input('address'),
            'zip' => $request->input('zip'),
            'vatnumber' => $request->input('vatnumber')
        ]);  
Activity icon

Replied to About Custom Messages Validation

So you mean to use:

public function messages()
{
    return [
        'email.required' => 'A email is required',
        'password.required' => 'A password is required',
    ];
}
Activity icon

Started a new Conversation About Custom Messages Validation

I am struggling to understand how to custom valid messages like "This e-mail is valid" to "The e-mail you inserted is not exist". according to https://laravel.com/docs/8.x/validation#customizing-the-error-messages if i use this function:

public function messages()
    {
        return [
            'title.required' => 'A title is required',
            'body.required' => 'A message is required',
        ];
    }

to my userController:

public function postSignup(Request $request){
        $this->validate($request, [
            'email' => 'required|string|email|max:255|unique:users|confirmed|exists:users',
            'password' => 'required|string|min:6|confirmed|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#[email protected]$%^&*-]).{6,}$/',
            'password_confirmation' => 'required|min:6',
            'phone' => 'required|regex:/[6-9]{10}/',
            'stathero' => 'numeric|regex:/[2-9]{10}/',
            'name' => 'required|max:12',
            'surname' => 'required|max:13',
            'city' => 'required|max:12',
            'address' => 'required|max:25',
            'zip' => 'required|numeric|min:5',
            'vatnumber' => 'nullable|regex:/(01)[0-8]{8}/'
        ]);              

        
    
        $this->validate($request, $rules, $customMessages);
        $user = new User([
            'email' => $request->input('email'),
            'password' => bcrypt($request->input('password')),
            'token' => str_random(35),
            'phone' => $request->input('phone'),
            'stathero' =>$request->input('stathero'),
            'name' => $request->input('name'),
            'surname' => $request->input('surname'),
            'city' => $request->input('city'),
            'address'=> $request->input('address'),
            'zip' => $request->input('zip'),
            'vatnumber' => $request->input('vatnumber')
        ]);  
        
        $user->save(); 
        Auth::login($user);
        Auth()->user()->sendVerificationEmail();      

        if(Session::has('oldUrl')){
            $oldUrl = Session::get('oldUrl');
            Session::forget('oldUrl');
            return redirect()->to(Session::get('oldUrl'));
        }
        return redirect()->route('home')->with('usercreated', 'Your account have been created!');        
    }
    public function messages()
    {
        return [
            'title.required' => 'A title is required',
            'body.required' => 'A message is required',
        ];
    }

It is right way?

Oct
21
1 month ago
Activity icon

Replied to Pop Up Window + User Not Exist

Another thing that is worth to mension is that when I click login the address turn into http://localhost:8080/user/signin?_token=Suapesc06KSH8EWwUz6a2ERfDMKBMXNoo3ecAEl2 and I think that is the hidden issue. Also I used the original blade and the message works!

Thank you @a4ashraf & @michaloravec !

Activity icon

Replied to Pop Up Window + User Not Exist

@michaloravec I think I get it now. Right now the database have no any user registered, that is why does not appear, does not it?

Activity icon

Replied to Pop Up Window + User Not Exist

@michaloravec Something wrong with the appearance of the message.

Activity icon

Replied to Pop Up Window + User Not Exist

@a4ashraf You mean:

$this->validate($request, [
            'email' => 'required|email|exists:users,email',
            'password' => 'required|min:8'
        ]); 

right?

Activity icon

Replied to Pop Up Window + User Not Exist

I am just updated the post to see the blade.php much better. @a4ashraf @michaloravec

Activity icon

Replied to Pop Up Window + User Not Exist

@a4ashraf I did but still just resfreshing:

<div class="form">
    <form action="">
      <h1>Sign in</h1>  
      @if(session('usernotexist'))
      <div class="alert alert-danger">
        {{ session('usernotexist')}}
      </div>
      @endif  

controller:

$users = User::where('email', $request->input('input'))->get();
        if (count($users)  < 1) {
            $request->session()->flash('usernotexist', 'warning: not exist');
            return redirect()->route('user.signin'); 
Activity icon

Started a new Conversation Pop Up Window + User Not Exist

Hello.

  1. About to check if user exist or not I am using this way:

Controller:

public function postSignin(Request $request){
        $this->validate($request, [
            'email' => 'email|required',
            'password' => 'required|min:8'
        ]);          
        if (User::where('email', '=', $request->input('input'))->exists()) {
            $request->session()->flash('usernotexist', 'warning: not exist');
            return redirect()->route('user.signin');         
}         

I am not getting the error but just refresh page. blade:

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

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Sign in</title>
  <link rel="stylesheet" href={{ URL::to('src/css/signin.css')}}>
  <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
  <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <!------ Include the above in your HEAD tag ---------->
  <nav class="navbar navbar-expand-lg navbar-light navbar-laravel">
    <div class="container">
      <a class="navbar-brand" href="{{route('product.index')}}">Home</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

    </div>
  </nav>
</head>

<body>
  <div class="form">
    <form action="">
      <h1>Sign in</h1>        
      <form action="{{ route('user.signin') }}" method="post">
        <input type="email" name="" id="email" placeholder="Enter email"><br>
        <input type="password" name="" id="password" placeholder="Enter password"><br>
        <input type="checkbox" onclick="confirmfunction()">Show Password
        <script>
          function confirmfunction() {
                    var x = document.getElementById("password");
                    if (x.type === "password") {
                      x.type = "text";
                    } else {
                      x.type = "password";
                    }
                  }
        </script>
        <input type="submit" value="Sign In" value="Sign in" class="signin"> <br>
        {{ csrf_field() }}<br><br>
        @if(count($errors) > 0)
      <div class="alert alert-danger">
        @foreach ($errors->all() as $error)
        <p>{{ $error }}</p>
        @endforeach
      </div>
      @endif
      @if(session('success'))
      <div class="alert alert-success">
        {{ session('success')}}
      </div>
      @endif
      @if(session('error'))
      <div class="alert alert-danger">
        {{ session('error')}}
      </div>
      @endif
      @if(session('userdelete'))
      <div class="alert alert-success">
        {{ session('userdelete')}}
      </div>
      @if(session('usernotexist'))
      <div class="alert alert-danger">
        {{ session('usernotexist')}}
      </div>
      @endif  
      @endif      
        <label for="remember_me">
          <input type="checkbox" name="remember_me" id="remember_me" value="1">Remember Me
        </label>
      </form>
      <p><a href="{{ route('password.request')}}">Forget password?</a></p>      
      <p>Do not have an account? <a href="{{ route('user.signup') }}">Sign up instead!</p>
  </div>
</body>

</html>
  1. Also how can turn from just a message to a pop up window at Laravel?
Oct
16
1 month ago
Activity icon

Replied to I Think I Messed Up About Sql

@rodrigo.pedra First of all you helped me a lot so THANK YOU very much.

Oct
15
1 month ago
Activity icon

Replied to I Think I Messed Up About Sql

Not at all changed. The missing driver now is not the issue but only the missing database...and when I was ready to do what did you say before reply on this post...another issue pop up:

The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.
Activity icon

Replied to I Think I Messed Up About Sql

@rodrigo.pedra Unfortunaly the issue is not solved. I finaly succeed to update laravel and php and enable mysqlnd & pdo_mysql:

[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
pgsql
Phar
Reflection
session
SimpleXML
soap
sockets
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
Activity icon

Awarded Best Reply on Install Dependency On Composer

@sergiu17 @sinnbeck After hours and days strugling solved by copy the php file from MAMP/conf/7.4.1/php to MAMP/bin/php/7.4.1

Activity icon

Replied to Install Dependency On Composer

@sergiu17 @sinnbeck After hours and days strugling solved by copy the php file from MAMP/conf/7.4.1/php to MAMP/bin/php/7.4.1

Oct
13
1 month ago
Activity icon

Replied to Install Dependency On Composer

I did every step.

Activity icon

Replied to Install Dependency On Composer

Yes it missing and i added but no sense...

Activity icon

Replied to Install Dependency On Composer

@sergiu17 Already tryed this as you can see at the post. I updated.

Activity icon

Started a new Conversation Install Dependency On Composer

I am trying to execute a migration and an error says: Driver missing so I need to command: composer require doctrine/dbal but this happen:

Problem 1
    - league/flysystem 1.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - league/flysystem 1.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - league/flysystem 1.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - Installation request for league/flysystem (locked at 1.1.3) -> satisfiable by league/flysystem[1.1.3].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\MAMP\bin\php\php7.3.7\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

Also tryed to add the line at php.ini: extension=fileinfo

Activity icon

Awarded Best Reply on I Think I Messed Up About Sql

@rodrigo.pedra Solved! The issue was an syntax error at a line in ini.php

Oct
12
1 month ago
Activity icon

Replied to I Think I Messed Up About Sql

@rodrigo.pedra Solved! The issue was an syntax error at a line in ini.php

Activity icon

Started a new Conversation I Think I Messed Up About Sql

After backup my project, I reinstalled the php handler and again put back the project to the htdocs file. After a few issues that I solve another one poped up....:

Illuminate\Database\QueryException 

  could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

Also at localhost:

SQLSTATE[HY000] [1049] Unknown database 'laravel' (SQL: select * from `products`)

Using commands like:composer update & php artisan migrate:fresh & composer dumpautoload & php artisan view:clear & php artisan cache:clear & php artisan route:clear & php artisan config:clear it make no sense.

Oct
11
1 month ago
Activity icon

Awarded Best Reply on An Old Issue About SSL/TLS Protection

Finally solved! The problem was the php version of MAMP. I was using the latest version (7.4.1) when I installed composer. So I choosed the 7.3.7 version during the installing...and finnaly could use: composer update Thank you @sarwarahmed @sinnbeck. Now the latest version is:

Laravel Framework 8.9.0
Activity icon

Replied to An Old Issue About SSL/TLS Protection

Finally solved! The problem was the php version of MAMP. I was using the latest version (7.4.1) when I installed composer. So I choosed the 7.3.7 version during the installing...and finnaly could use: composer update Thank you @sarwarahmed @sinnbeck. Now the latest version is:

Laravel Framework 8.9.0
Activity icon

Replied to An Old Issue About SSL/TLS Protection

No. As I said I am afraid to lose my security on Laravel.

Activity icon

Replied to An Old Issue About SSL/TLS Protection

@sarwarahmed I did everything. The most difficult situation I have never faced.

Activity icon

Replied to An Old Issue About SSL/TLS Protection

@sinnbeck There is no such a line like that. I almost mensioned before.

Activity icon

Replied to An Old Issue About SSL/TLS Protection

@sinnbeck

[PHP Modules]
bcmath       
calendar     
com_dotnet   
Core
ctype        
date
dom
filter       
hash
iconv        
json
libxml       
mysqlnd      
odbc
pcre
PDO
Phar
Reflection
session
SimpleXML
soap
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
Activity icon

Replied to An Old Issue About SSL/TLS Protection

@sinnbeck Many times and closed the handler.

Activity icon

Replied to An Old Issue About SSL/TLS Protection

Excacly, I am afraid to use that command. @sarwarahmed

Activity icon

Started a new Conversation An Old Issue About SSL/TLS Protection

I searched and I found that there is another topic with the same issue as mine but it confusing me a lot... The issue is that recently reinstalled MAMP, cause this was the only way to update the php version and the main reason to update Laravel 7 to 8. I am using windows 10. At ini.php file uncomment the two lines:

extension=openssl

extension_dir = "ext"

but when I give the command

composer update

i get:



  [Composer\Exception\NoSslException]                                                                                                                                                                                   
  The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to tr   
  ue.                                                                                                                                                                                                                   
                                                                                                                                                                                                                        

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

It is not highly recommended to disable the TLS

Oct
10
1 month ago
Activity icon

Replied to Laravel Upgrade

@automica @sinnbeck Virtual box is not convenient for me so i am gonna use EasyPhp

Activity icon

Replied to Laravel Upgrade

@automica I have windows.

Activity icon

Replied to Laravel Upgrade

@jlrdw everything

Activity icon

Replied to Laravel Upgrade

@sinnbeck That is the problem about MAMP. What other program can do the same job as MAMP?

Activity icon

Started a new Conversation Laravel Upgrade

Following the article "Upgrading To 8.0 From 7.x", changing the dependencies from composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5",
        "alphametric/laravel-validation-rules": "^2.1",
        "doctrine/dbal": "^2.10",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^1.0",
        "guzzlehttp/guzzle": " ~7.0.1",
        "laravel/framework": "^8.0",
        "laravel/helpers": "^1.2",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^3.0",
        "stripe/stripe-php": "^7.30"
    },
    "require-dev": {
        "facade/ignition": "^2.3.6",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.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"
        ]
    }
}

When i run composer update I get:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package guzzlehttp/guzzle (locked at 4.2.4, required as  ~7.0.1) is satisfiable by guzzlehttp/guzzle[4.2.4] but these conflict with your requirements or minimum-stability.
  Problem 2
    - The requested package laravel/framework (locked at v7.28.4, required as ^8.0) is satisfiable by laravel/framework[v7.28.4] but these conflict with your requirements or minimum-stability.
  Problem 3
    - The requested package laravel/ui (locked at v2.4.1, required as ^3.0) is satisfiable by laravel/ui[v2.4.1] but these conflict with your requirements or minimum-stability.
  Problem 4
    - The requested package nunomaduro/collision (locked at v4.2.0, required as ^5.0) is satisfiable by nunomaduro/collision[v4.2.0] but these conflict with your requirements or minimum-stability.
  Problem 5
    - The requested package phpunit/phpunit (locked at 8.5.8, required as ^9.0) is satisfiable by phpunit/phpunit[8.5.8] but these conflict with your requirements or minimum-stability.
  Problem 6
    - laravel/framework v8.9.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.8.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.7.1 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.7.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.6.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.5.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.4.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.3.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.2.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.1.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.0.4 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.0.3 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.0.2 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.0.1 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework v8.0.0 requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - laravel/framework 8.x-dev requires php ^7.3 -> your PHP version (7.2.14) does not satisfy that requirement.
    - Installation request for laravel/framework ^8.0 -> satisfiable by laravel/framework[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0, v8.9.0].


Installation failed, reverting ./composer.json to its original content.

I am using MAMP because XAMPP does not have 32bit and my php version is 7.2.14

Aug
05
3 months ago
Activity icon

Replied to About Route In Contact Form

get and post...clear. Thank you...again n again.

Activity icon

Started a new Conversation About Route In Contact Form

I have not been working with Laravel for months, so I forgot about the routes: To be more specific, recently worked the contact form part for my project using this routes at web.php:

Route::get('/contact','[email protected]')->name('contact');
Route::get('/contact','[email protected]')->name('contact.store');

At views I have contact.blade.php and call it at header.blade.php:

<a class="dropdown-item" href="{{ route('contact') }}">Contact</a>

and I get no contact route found.

May
23
6 months ago
Activity icon

Replied to Issue About An Error

@snapey i am still learning laravel.

Activity icon

Replied to Issue About An Error

@snapey i do not get it very well that you said. You mean that i must not include the function inside the Auth::attempt?

Activity icon

Started a new Conversation Issue About An Error

Hi. Something wrong happens. I get no error while i am trying just to submit sign in.

At usercontroller

 if (Auth::attempt(['email' => $request->input('email'), 'password' => $request->input('password')])){
            $user = User::where('email', '=', Input::get('email'))->first();
                if ($user === null) {
                    $request->session()->flash('usernotexist', 'User does not exist!');
                    return back();
                }
               else if (User::where('email', '=', Input::get('email'))->exists()) {
                    $request->session()->flash('userexist', 'User exist');
                    return back();
                }
             $remember_me = $request->has('remember_me') ? true : false; 
            if(Session::has('oldUrl')){
                $oldUrl = Session::get('oldUrl');
                Session::forget('oldUrl');
                return redirect()->to(Session::get('oldUrl'));
            }
            return redirect()->route('product.index');
        }
        return redirect()->back();

signin.blade.php


  <div class="form">
    <form action="">
      <h1>Sign in</h1>
      @if(count($errors) > 0)
    <div class="alert alert-danger">
        @foreach ($errors->all() as $error)
        <p>{{ $error }}</p>
        @endforeach
    </div>
    @endif
    @if(session('success'))
    <div class="alert alert-success">
        {{ session('success')}}
    </div>
    @endif
    @if(session('error'))
    <div class="alert alert-danger">
        {{ session('error')}}
    </div>
    @endif
    @if(session('userdelete'))
    <div class="alert alert-success">
        {{ session('userdelete')}}
    </div>
    @endif    
         @if (Session::has('usernoexist'))
            <div class="alert alert-danger  text-center">
               <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
                <p>{{ Session::get('no_user') }}</p>
               </div>
               @endif 
    <form action="{{ route('user.signin') }}" method="post">
      <input type="email" name="" id="email" placeholder="Enter email"><br>
      <input type="password" name="" id="password" placeholder="Enter password"><br>
      <input type="checkbox" onclick="confirmfunction()">Show Password
            <script>
                function confirmfunction() {
                    var x = document.getElementById("password");
                    if (x.type === "password") {
                      x.type = "text";
                    } else {
                      x.type = "password";
                    }
                  }
            </script>
      <input type="submit" value="Sign In" value="Sign in" class="signin"> <br>
      {{ csrf_field() }}<br><br>        
          <label for="remember_me">
              <input type="checkbox" name="remember_me" id="remember_me" value="1">Remember Me
          </label>     
    </form> 
      <p><a href="{{ route('password.request')}}">Forget password?</a></p><hr>
      <p class="signup">Do not have an account? <a href="{{ route('user.signup') }}">Sign up instead!</p>
  </div>
</body>
</html>