Randy_Johnson

Randy_Johnson

Member Since 1 Year Ago

Experience Points
2,180
Total
Experience

2,820 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
7
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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
2,180 XP
Dec
11
5 days ago
Activity icon

Started a new Conversation Access Level On Laravel 5.6 Make:auth

Hi, I am wanting to add access level column to the user database table and I was wanting some guidance before I attempt it. I just followed a tutorial which was pretty complex and I didn't so much understand (could be since I was reading from my phone* not internet) and was wondering if anyone has a good tutorial for admin access.

I was wanting somewhere where I can just add access level column 0 admin, 1 user etc...

Dec
06
1 week ago
Activity icon

Started a new Conversation 000webhost SSL Working Then Not Working

Hi I have a website with an ssl which decides to work and then not work and work etc..

My website is teachingdocs.000webhostapp.com

İt seems during the day it stops working but at night it works, it is so strange.

İt's giving me this address now http://88.255.216.16/landpage?op=1&ms=http://teachingdocs.000webhostapp.com/

My ssl was a free one. İt's not good that o cannot remember buy it's in the top 10 on a Google search. I am at work atm so I cannot stay on my phone to long so I hope you understand and can help.

Dec
03
1 week ago
Activity icon

Replied to 000webhost Can Log In, But Unable To Register

Hey thanks, I just had to make my remember token nullable.

Activity icon

Started a new Conversation 000webhost Can Log In, But Unable To Register

Hi, I have come to the final stage of that having an account already in the db, I can log in, but when it comes to creating an account I keep getting the page, whoops something went wrong.

I get a status code of 500: internal server error, and the fact that I can login with an account made through phpmyadmin must mean the problem lies within the sending of the information to the server.

I am clueless so please help!

Activity icon

Replied to 000webhost Login Register 404

I thought this may be the problem, I downloaded a .htaccess file but then only a white page was presented at /. So I changed it back. Can anyone tell me where to find the htaccess. I couldn't find the original on the upload. So am guessing I can just try uploading it again from my own environment. At work ATM so I don't have access to a computer. Lemme know for any insight

Dec
02
2 weeks ago
Activity icon

Started a new Conversation 000webhost Login Register 404

I have followed this tutorial to get my website on 000webhost for the free hosting.

https://www.000webhost.com/forum/t/deploy-laravel-project-into-000webhost-site/127323

I now have the problem of when clicking login I am getting a 404. Please check.

https://teachingdocs.000webhostapp.com/

Activity icon

Replied to Deploying To 000webhost

Hey thanks guys, I got through it by accepting a security risk and advanced to my main page which is giving me Whoops, looks like something went wrong. If there is any heads up on what this could be. I have no more information to give at this point.

Also this is as far into the adventure I have been so is there a way I can find out what is wrong, maybe putting my settings back to dev?

Dec
01
2 weeks ago
Activity icon

Started a new Conversation Deploying To 000webhost

I am trying to deploy to 000webhost, I have been told to zip the file and then unzip it in the root directory and from there copy all files from public to public_html. Now I keep getting an SSL error.

You can check it here

https://www.teachingdocs.000webhostapp.com/

Nov
30
2 weeks ago
Activity icon

Started a new Conversation Laravel To Production!

Hi, I am putting laravel to production and there are some things that I wish to clear up.

In the config > database.php there it shows data in such as format as

'host' => env('DB_HOST', 'sql101.epizy.com'),

I am just curious to why there is 2 parameters, the only reason I can see is that the DB HOST is grabbing my data from env and if the env is empty it is using p2 as a back up. Please clarify.

What is the process I should be going through, what files should I be checking and changing for the production env.

In something like c Panel or v Panel etc.... How do I do db migrations!?

PS I should just add that I am limited because the website I have dev is just helping my friends with information.

Activity icon

Replied to Images Not Working When Changing From Html To Php

I'm sorry guys, I have figured it out, the file goes inside the public folder.

Nov
24
3 weeks ago
Activity icon

Started a new Conversation Images Not Working When Changing From Html To Php

Hey, when I change my file type from html to php, the images no longer work. I have no idea why this is happening because the src is correct. Any ideas to why this is happening.

Sep
30
2 months ago
Activity icon

Started a new Conversation E-commerce Blue Print

Hey I want to build an e-commerce site from scratch. I created this as a blueprint sort of thing.

https://imguh.com/image/pN0Lj

Is this looking correct or are there things that need changing. Am trying to keep it simple but to have an end goal of a fully functional web app.

The bit that most worries me is that the database tables are correct and are holding the correct information.

Regards

Aug
30
3 months ago
Activity icon

Replied to Auto Generate Routes With The Controller

Sorry dude, was busy looking for an apartment, am sure you can understand, very busy. Thank you for the help the advice was excellent.

Activity icon

Replied to Auto Generate Routes With The Controller

So if I write this in my routes file it will route to all functions inside the controller.

Activity icon

Started a new Conversation Auto Generate Routes With The Controller

Of course its great to type php artisan make:controller MyController --resource. But is there a way to create the routes which go with all the created functions within MyController.

Regards, Joshua

Aug
28
3 months ago
Activity icon

Started a new Conversation SQLSTATE[42S02]: Base Table Or View Not Found: 1146 Table 'book_store.book_order' Doesn't Exist

        @csrf
        <textarea style="width: 100%;" name="address" rows="5"></textarea>
        <hr>
        <button class="btn btn-block btn-primary btn-large">Place order</button>
        <a class="btn btn-block btn-warning btn-large" href="{{URL('/')}}">Back</a>
    </form>```


```Route::post('/order', array('before'=>'auth.basic','uses'=>'[email protected]'));```


```    public function postOrder()
    {
        // Sets an array with validation rules for the orders.blade.php.
        $rules = array(
            'address' => 'required'
        );

        // The validation array is passed and is processed for all inputs.
        $validator = Validator::make(Input::all(), $rules);

        // If the validation fails the user is redirected to the cart.blade.php with an error message.
        if ($validator->fails())
        {
            return Redirect::route('cart')->with('error', 'Address field is required!');
        }

        // A member id is set and the current users id is stored within the variable.
        $member_id = Auth::user()->id;
        // A address is set and the input address from the order.blade.php is passed and stored.
        $address = Input::get('address');

        // Checks the cart db and returns books where the members id is equal to the current members id.
        $cart_books = Cart::with('Books')->where('member_id', '=', $member_id)->get();
        // Checks the cart db and returns and calulates the sum of all books for the members id.
        $cart_total = Cart::with('Books')->where('member_id', '=', $member_id)->sum('total');

        // If there are no books inside the cart the user is redirected to the index with an error.
        if (!$cart_books)
        {
            return Redirect::route('index')->with('error', 'Your cart is empty.');
        }

        // Create an entry into the database where an order is stored.
        $order = Order::create(
            array(
                'member_id' => $member_id,
                'address' => $address,
                'total' => $cart_total
            ));

        foreach ($cart_books as $order_books) {
            $order->orderItems()->attach($order_books->book_id, array(
                'amount'=>$order_books->amount,
                'price'=>$order_books->Books->price,
                'total'=>$order_books->Books->price*$order_books->amount
            ));
        }

        // Delete the entries within the database where the member id is equal to member id.
        Cart::where('member_id', '=', $member_id)->delete();

        // Redirects the user to index with a success message.
        return Redirect::route('index')->with('message', 'Your order was processed successfully!');
    }```


The problem seems to be at this line of code here!

    foreach ($cart_books as $order_books) {
        $order->orderItems()->attach($order_books->book_id, array(
            'amount'=>$order_books->amount,
            'price'=>$order_books->Books->price,
            'total'=>$order_books->Books->price*$order_books->amount
        ));
    }```

Jumping to the orderItems():

namespace App;

use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    protected $table = 'orders';

    protected $fillable = [
        'member_id', 'address', 'total',
    ];

    public function orderItems()
    {
        return $this->belongsToMany(Book::class)->withPivot('amount', 'total');
    }
}

I have no idea why it is creating a book_order table, or maybe that I have to create one, but there is no where within the book a mention of a book_order table.

There is a table called order_books.

Activity icon

Replied to Book Not Found!

It worked! You bring tears to my eyes my friend, thank you so much!

Activity icon

Started a new Conversation Book Not Found!

I have a strange problem where I have to lines of code that are very simpler to each other, one is working find and the other isn't.

The line of code in question that isn't working is:

'''$cart_books=Cart::with('Books')->where('member_id','=',$member_id)->get();'''

with the error output of:

'''Class 'Book' not found'''

'''/opt/lampp/htdocs/laravel/bookstore/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php'''

''' }

/**
 * Create a new model instance for a related model.
 *
 * @param  string  $class
 * @return mixed
 */
protected function newRelatedInstance($class)
{
    return tap(new $class, function ($instance) {
        if (! $instance->getConnectionName()) {
            $instance->setConnection($this->connection);
        }
    });
}

/**
 * Get all the loaded relations for the instance.
 *
 * @return array
 */
public function getRelations()
{
    return $this->relations;'''

Full logging here:

https://textsaver.flap.tv/lists/2ujv

I also have another line just below called:

'''$cart_total = Cart::with('Books')->where('member_id', '=', $member_id)->sum('total');'''

Which is working fine!

I am guessing the Cart::with('Books') is referencing:

'''<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Cart extends Model { protected $table = 'carts';

protected $fillable = [
    'member_id', 'book_id', 'amount', 'total',
];

public function Books()
{
    return $this->belongsTo('Book', 'book_id');
}

}'''

Aug
25
3 months ago
Activity icon

Replied to So Close But So Far! - 419 Page Expired

Hi, I have no progressed it was the CSRF tag. Snapey, yes I will do this.

I have now have a new problem which is

Class 'Book' not found

The model Book is there and I have referenced it by

use App\Book;

The error does even show anything within my code:

/**
 * Create a new model instance for a related model.
 *
 * @param  string  $class
 * @return mixed
 */
protected function newRelatedInstance($class)
{
    return tap(new $class, function ($instance) {
        if (! $instance->getConnectionName()) {
            $instance->setConnection($this->connection);
        }
    });
}

/**
 * Get all the loaded relations for the instance.
 *
 * @return array
 */
public function getRelations()
Activity icon

Started a new Conversation So Close But So Far! - 419 Page Expired

Hi, I am just coming to the end of my project and I am having trouble with the post request. I am following a book called Laravel application blueprints, unfortunately the book is in Laravel four but I am able to crawl my way through. I have previous been told to do the course presented on this website, which I will do when I have finished. I just need this done so that I am able to start my business buying and selling.

I don't think it has anything to do with the controller but I will share all cold just incase, also I have had 2 different messages. One being the 419 error and another saying that post cannot be handled and to use get.

The GET method is not supported for this route. Supported methods: POST.

view

form action="/cart/add" name="add_to_cart" method="post" accept-charset="UTF-8"> 1 2 3 4 5 Add to Cart </form

routes

// Cart Routes Route::get('/cart', array('before'=>'auth.basic','as'=>'cart','uses'=>'[email protected]')); Route::post('/cart/add', array('before'=>'auth.basic', 'uses'=>'[email protected]')); Route::get('/cart/delete/{id}', array('before'=>'auth.basic','as'=>'delete_book_from_cart','uses'=>'[email protected]'));

controller

public function postAddToCart() { // Declares validation rules. $rules = array( 'amount' => 'required|numeric', 'book' => 'required|numeric|exists:books,id' );

    //  Adds validation rules to all inputs.
    $validator = Validator::make(Input::all(), $rules);

    // If validation rules are not met, then the validation fails. The route is redirected with an error message.
    if ($validator->fails())
    {
        return Redirect::route('index')->with('error', 'The book could not be added to your cart!');
    }

    // Declares local variables and gets inputs from product_list.blade.php and stores them here.
    $member_id = Auth::user()->id;
    $book_id = Input::get('book');
    $amount = Input::get('amount');

    // Takes the book id, finds the data within the database with the same id and then uses the cost of the book to calculate the total.
    $book = Book::find($book_id);
    $total = $amount*$book->price;

    // Check the cart database to see if the book has been stored in their cart.
    $count = Cart::where('book_id', '=', '$book_id')->where('member_id', '=', $member_id)->count();

    // If $count is a positive number, then the product is inside the cart and should not be added.
    if ($count) 
    {
        return Redirect::route('index')->with('error', 'The book is already in your cart!');
    }

    // If $count is 0, then a entry into the database is created.
    Cart::create(
        array(
            'member_id' => $member_id,
            'book_id' => $book_id,
            'amount' => $amount,
            'total' => $total
    ));

    // Once all this is done, and the entry is inside the database, the user is returned to the route::cart.
    return Redirect::route('cart');
Aug
24
3 months ago
Activity icon

Replied to Laravel Newbie - Problem With Cart::

Okay I best give it ago. I am having no luck fixing the current problem which is

Call to a member function get() on integer

Activity icon

Started a new Conversation Laravel Newbie - Problem With Cart::

Hi, I am new to Laravel coming from Codeiginiter so I have some experience with MVC. I am following a book called 'Laravel Aplication Blue Prints' but the problem lays in that it is written for Laravel 4, so I am having to make my way through it slowly - but a great learning process for sure.

I have come to a section of making the cart and on this section I have:

Controller

namespace App\Http\Controllers;

use Illuminate\Http\Request; use Auth; use Cart;

class CartController extends Controller { public function postAddToCart() { // Declares validation rules. $rules = array( 'amount' => 'required|numeric', 'book' => 'required|numeric|exists:books,id' );

    //  Adds validation rules to all inputs.
    $validator = Validator::make(Input::all(), $rules);

    // If validation rules are not met, then the validation fails. The route is redirected with an error message.
    if ($validator->fails())
    {
        return Redirect::route('index')->with('error', 'The book could not be added to your cart!');
    }

    // Declares local variables and gets inputs from product_list.blade.php and stores them here.
    $member_id = Auth::user()->id;
    $book_id = Input::get('book');
    $amount = Input::get('amount');

    // Takes the book id, finds the data within the database with the same id and then uses the cost of the book to calculate the total.
    $book = Book::find($book_id);
    $total = $amount*$book->price;

    // Check the cart database to see if the book has been stored in their cart.
    $count = Cart::where('book_id', '=', '$book_id')->where('member_id', '=', $member_id)->count();

    // If $count is a positive number, then the product is inside the cart and should not be added.
    if ($count) 
    {
        return Redirect::route('index')->with('error', 'The book is already in your cart!');
    }

    // If $count is 0, then a entry into the database is created.
    Cart::create(
        array(
            'member_id' => $member_id,
            'book_id' => $book_id,
            'amount' => $amount,
            'total' => $total
    ));

    // Once all this is done, and the entry is inside the database, the user is returned to the route::cart.
    return Redirect::route('cart');
}

public function getIndex()
{
    // Declares $member_id and store the current users id there.
    $member_id = Auth::user()->id;

    // Returns all the books with in the cart where the member id is present.
    $cart_books = Cart::with('Books')->where('member_id', '=', $member_id->get());
    // Get the amount of books within the cart.
    $cart_total = Cart::with('Books')->where('member_id', '=', $member_id->sum('total'));

    // If there are no books within the cart that are related to the member id, then an error is returned.
    if (!$cart_books)
    {
        return Redirect::route('index')->with('error', 'Your cart is empty!');
    }

    // The view is called and the cart books and cart total is passed to the view.
    return View::make('cart')
        ->with('cart_books', $cart_books)
        ->with('cart_total', $cart_total);
}

public function getDelete($id)
{   // The id of the object to be delete is passed into the function and run. 
    $cart = Cart::find($id)->delete();
    // The user is redirected to route::cart.
    return Redirect::route('cart');
}

}

Route: // Cart Routes Route::get('/cart', array('before'=>'auth.basic','as'=>'cart','uses'=>'[email protected]')); Route::post('/cart/add', array('before'=>'auth.basic','uses'=>'[email protected]')); Route::get('/cart/delete/{id}', array('before'=>'auth.basic','as'=>'delete_book_from_cart','uses'=>'[email protected]'));

with the view accordingly...

My error is:

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'Cart' not found

along with:

/opt/lampp/htdocs/laravel/bookstore/app/Http/Controllers/CartController.php

        // If $count is 0, then a entry into the database is created.
        Cart::create(
            array(
                'member_id' => $member_id,
                'book_id' => $book_id,
                'amount' => $amount,
                'total' => $total
        ));
 
        // Once all this is done, and the entry is inside the database, the user is returned to the route::cart.
        return Redirect::route('cart');
    }
 
    public function getIndex()
    {
        // Declares $member_id and store the current users id there.
        $member_id = Auth::user()->id;
 
        // Returns all the books with in the cart where the member id is present.
        $cart_books = Cart::with('Books')->where('member_id', '=', $member_id->get());
        // Get the amount of books within the cart.
        $cart_total = Cart::with('Books')->where('member_id', '=', $member_id->sum('total'));
 
        // If there are no books within the cart that are related to the member id, then an error is returned.
        if (!$cart_books)
        {
            return Redirect::route('index')->with('error', 'Your cart is empty!');
        }
 
        // The view is called and the cart books and cart total is passed to the view.
        return View::make('cart')
            ->with('cart_books', $cart_books)
            ->with('cart_total', $cart_total);
    }
 
    public function getDelete($id)
    {   // The id of the object to be delete is passed into the function and run. 
        $cart = Cart::find($id)->delete();
        // The user is redirected to route::cart.
        return Redirect::route('cart');

Arguments

"Class 'Cart' not found"

Please help!

Regards, Randy

Aug
17
3 months ago
Activity icon

Replied to Seeder Class Not Found In Laravel5 Seeding

I had an error with the seeder, I fixed all the classes and re ran the command to find the error again. I then ran this:

composer dumpautoload

and everything was working fine. What is this command doing?

Aug
16
4 months ago
Activity icon

Replied to SQLite Driver Installed But Not Seen!

Yeah, I've just done it, and just installed sqlite3. Now I am getting a new error of:

[Fri Aug 16 14:41:33 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib/php/20170718/pdo_sqlite (/usr/lib/php/20170718/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_sqlite.so (/usr/lib/php/20170718/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 [Fri Aug 16 14:41:33 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/lib/php/20170718/sqlite3 (/usr/lib/php/20170718/sqlite3: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/sqlite3.so (/usr/lib/php/20170718/sqlite3.so: cannot open shared object file: No such file or directory)) in Unknown on line 0.

Aug
15
4 months ago
Activity icon

Started a new Conversation SQLite Driver Installed But Not Seen!

Hi, my sqlite driver has just been installed and I can see it with sqlite command. When I run php artisan migrate I get this error.


  at <font color="#4E9A06">/opt/lampp/htdocs/laravel_tutorials/freecodecamp/vendor/laravel/framework/src/Illuminate/Database/Connection.php</font>:<font color="#4E9A06">664</font>
    <font color="#555753"><i>660| </i></font><font color="#C4A000">        </font><font color="#555753"><i>// If an exception occurs when attempting to run a query, we&apos;ll format the error</i></font>
    <font color="#555753"><i>661|         // message to include the bindings with SQL, which will make this exception a</i></font>
    <font color="#555753"><i>662|         // lot more helpful to the developer instead of just the database&apos;s errors.</i></font>
    <font color="#555753"><i>663|         </i></font><font color="#C4A000">catch (</font><b>Exception $e</b><font color="#C4A000">) {</font>
<span style="background-color:#CC0000"><b>  &gt; </b></span><font color="#555753"><i>664| </i></font><font color="#C4A000">            throw new </font><b>QueryException</b><font color="#C4A000">(</font>
    <font color="#555753"><i>665| </i></font><font color="#C4A000">                </font><b>$query</b><font color="#C4A000">, </font><b>$this</b><font color="#C4A000">-&gt;</font><b>prepareBindings</b><font color="#C4A000">(</font><b>$bindings</b><font color="#C4A000">), </font><b>$e</b>
    <font color="#555753"><i>666| </i></font><b>            </b><font color="#C4A000">);</font>
    <font color="#555753"><i>667| </i></font><font color="#C4A000">        }</font>
    <font color="#555753"><i>668| </i></font>

  <font color="#C4A000">Exception trace:</font>

  <font color="#06989A">1   </font><font color="#C4A000">PDOException::(&quot;could not find driver&quot;)</font>
      <font color="#4E9A06">/opt/lampp/htdocs/laravel_tutorials/freecodecamp/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php</font>:<font color="#4E9A06">70</font>

  <font color="#06989A">2   </font><font color="#C4A000">PDO::__construct(&quot;sqlite:/opt/lampp/htdocs/laravel_tutorials/freecodecamp/database/database.sqlite&quot;, [])</font>
      <font color="#4E9A06">/opt/lampp/htdocs/laravel_tutorials/freecodecamp/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php</font>:<font color="#4E9A06">70</font>

  <font color="#4E9A06">Please use the argument </font><font color="#CC0000">-v</font><font color="#4E9A06"> to see more details.</font>
Aug
13
4 months ago
Activity icon

Replied to Doctrine\DBAL\Driver\PDOException

I get an error message saying

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Activity icon

Started a new Conversation Doctrine\DBAL\Driver\PDOException

I keep running into this problem and I have followed all instructions to fix it but it doesn't seem to be working.

I am running Linux Mint and I have run composer update etc with the message of that everything is up to date.

My composer.json also represents that it is there.

"require": { "php": "^7.1.3", "doctrine/dbal": "^2.9", "fideloper/proxy": "^4.0", "laravel/framework": "5.8.*", "laravel/tinker": "^1.0" },

Please please, I am actually at the stage where I am going to uninstall Linux and reinstall windows.

Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = ecommerce and table_name = migrations and table_type = 'BASE TABLE')

at /opt/lampp/htdocs/laravel/ecommerce/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [2002] No such file or directory") /opt/lampp/htdocs/laravel/ecommerce/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31

2 PDOException::("SQLSTATE[HY000] [2002] No such file or directory") /opt/lampp/htdocs/laravel/ecommerce/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27

Please use the argument -v to see more details.

Aug
12
4 months ago
Activity icon

Replied to Bagisto - Base Table Or View Not Found: 1146

I checked the migration files and there was nothing like that, so I ran php artisan migrate anyway and got this.

Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = als_tobacco_ltd and table_name = migrations)

at /opt/lampp/htdocs/laravel/bagisto-master/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [2002] No such file or directory") /opt/lampp/htdocs/laravel/bagisto-master/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31

2 PDOException::("SQLSTATE[HY000] [2002] No such file or directory") /opt/lampp/htdocs/laravel/bagisto-master/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27

Please use the argument -v to see more details.

Aug
11
4 months ago
Activity icon

Replied to Bagisto - Base Table Or View Not Found: 1146

I don't know. It just creates it all automatically. It's like going through WordPress install.

Activity icon

Started a new Conversation Bagisto - Base Table Or View Not Found: 1146

Illuminate \ Database \ QueryException (42S02) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'companyname.channels' doesn't exist (SQL: select * from channels limit 1) Previous exceptions

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'companyname.channels' doesn't exist (42S02)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'companyname.channels' doesn't exist (42S02)

Hi, I have installed Bagisto and have managed to fix most of my problems, now I am stuck on this problem which has left me scratching my head since I am unsure if I am suppsed to create the table channels or such.

If anyone has any knowledge of this problem for Bagisto please let me know!

Activity icon

Replied to Strange Things Happening With My Routes

I figured it out, I overwrote the home.blade.php, dunno why I never realized this before. Thanks for the help. I feel this post is no help for others, am I able to delete?

Aug
10
4 months ago
Activity icon

Started a new Conversation Strange Things Happening With My Routes

Route::get('/', '[email protected]'); Route::get('/about', '[email protected]'); Route::get('/contact', '[email protected]'); Auth::routes(); Route::get('/home', '[email protected]')->name('home');

As you can see with my routes I have '/' as the page controller home, but after just recently using the command to create the auth - php artisan make:auth the '/' is never called and I am sent to the net auth home page. I find this confusing because shouldn't I have to have /home within the url bar for it to be displayed, and why is this overwriting the original '/' pages controller home. Smells funky if you ask me.

Activity icon

Started a new Conversation Ecommerce With Auth Tutorials

Hi, can anyone recommend me any tutorials, my end goal is to create an e commerce site so I can start trading on it.

Aug
09
4 months ago
Activity icon

Started a new Conversation Setting FB Variables Int The .env

I am setting up fb login with socialite, I just came to a point which I ain't to sure about:

'facebook' => [
    'client_id'     => env('FB_CLIENT_ID'),
    'client_secret' => env('FB_CLIENT_SECRET'),
    'redirect'      => env('APP_URL') . '/facebook/callback',
],

with the env('var'_name'), do I set this inside the .env like such FB_CLIENT_ID = '342523tdgdrge'; or should I just set the variable inside the servies php file as such:

 'facebook' => [
    'client_id'     => 'dfasdfadfasdfasdfsdff',
    'client_secret' => 'fasdfsdafasdfasdfsdfsdf'
    'redirect'      => env('APP_URL') . '/facebook/callback',
],

Hope to hear from you soon.