aahoora

aahoora

Member Since 2 Years Ago

Experience Points 230
Experience Level 1

4,770 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 0
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.

28 Feb
2 years ago

aahoora left a reply on Error During Refresh Tables

@Cronix I already removed both migrations and tables for users and password_reset table.

aahoora left a reply on Error During Refresh Tables

@davidpiesse I guess you didn't read my post totally, actually I created my desire table users but when I run php artisan migrate:refresh, It errors!

aahoora started a new conversation Error During Refresh Tables

I use SQLITE and wanted to create my own users table so I removed predefined table and migration users using command:

Schema::drop('users');

after recreating table users, when I tried to refresh my tables by command:

php artisan migrate:refresh

I faced error:

[ErrorException]                                                 
  Undefined index: 2014_10_12_100000_create_password_resets_table

So I removed table and migration password_resets and executed command

composer dump-autoload

but no efffect!

How can I pass this error ?

Laravel 5.4

27 Feb
2 years ago

aahoora left a reply on Database (database/database.sqlite) Does Not Exist" Error On Running

Here is the whole error :

InvalidArgumentException in SQLiteConnector.php line 34:
Database (database/database.sqlite) does not exist.
in SQLiteConnector.php line 34
at SQLiteConnector->connect(array('driver' => 'sqlite', 'database' => 'database/database.sqlite', 'prefix' => '', 'name' => 'sqlite')) in ConnectionFactory.php line 221
at ConnectionFactory->Illuminate\Database\Connectors\{closure}()
at call_user_func(object(Closure)) in Connection.php line 882
at Connection->getPdo() in Connection.php line 903
at Connection->getReadPdo() in Connection.php line 392
at Connection->getPdoForSelect(true) in Connection.php line 318
at Connection->Illuminate\Database\{closure}('select * from "cards"', array()) in Connection.php line 640
at Connection->runQueryCallback('select * from "cards"', array(), object(Closure)) in Connection.php line 607
at Connection->run('select * from "cards"', array(), object(Closure)) in Connection.php line 326
at Connection->select('select * from "cards"', array(), true) in Builder.php line 1718
at Builder->runSelect() in Builder.php line 1703
at Builder->get() in CardsController.php line 11
at CardsController->index()
at call_user_func_array(array(object(CardsController), 'index'), array()) in Controller.php line 55
at Controller->callAction('index', array()) in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(CardsController), 'index') in Route.php line 203
at Route->runController() in Route.php line 160
at Route->run() in Router.php line 559
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 561
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 520
at Router->dispatchToRoute(object(Request)) in Router.php line 498
at Router->dispatch(object(Request)) in Kernel.php line 174
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53
at require_once('/var/www/html/laravel_proj/public/index.php') in server.php line 21

aahoora left a reply on Database (database/database.sqlite) Does Not Exist" Error On Running

the point is when I change .env file or config/database.php file and modify database path, the database path in error doen't change ! and still says:

Database (database/database.sqlite) does not exist. (SQL: select * from "cards") 

aahoora left a reply on Database (database/database.sqlite) Does Not Exist" Error On Running

@bobbybouwmann Here it is :

class CreateCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cards', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cards');
    }
}

aahoora left a reply on Database (database/database.sqlite) Does Not Exist" Error On Running

@bobbybouwmann yes, the database.sqlite file is in database directory. I create that using command touch database/database.sqlite

The command

php artisan migrate

run correctly, and I inserted data to database using tinker but when I want to fetch data from database, it errors : Database (database/database.sqlite) does not exist. (SQL: select * from "cards")

aahoora started a new conversation Database (database/database.sqlite) Does Not Exist" Error On Running

Hi

I've created an sqlite database using command

php artisan make:migration create_cards_table --create=cards 

and

php artisan migrate 

All things was well and I inserted data in my database successfully.

but when I run my code to fetch data from database I faced with this error:

Database (database/database.sqlite) does not exist. (SQL: select * from "cards") 

Here is my .env file:

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database/database.sqlite
DB_USERNAME=homestead
DB_PASSWORD=secret

and here is my config/database.php file:

'default' => env('DB_CONNECTION', 'sqlite'),
'connections' => [

        'sqlite' => [
            'driver' => 'sqlite',
            'database' => env('DB_DATABASE', database_path('database.sqlite')),
            'prefix' => '',
        ],

and here is my code:

app/Http/Controllers/CardsController.php

class CardsController extends Controller
{
    public function index () {

        $cards = DB::table('cards')-> get();

        return view('cards.index', compact('cards'));

    }
}

resources/views/cards/index.blade.php

@extends ('layout')

@section('content')
    @foreach($cards as $card)
        <div>{{ $card->title }}</div>

    @endforeach

@stop

How can I fix this?