Questions tagged [tinker]

Tinker is a REPL for the Laravel PHP framework.

136 questions
1
vote
4 answers

LARAVEL 8 - Tinker get null when I try to check the linked tags to each article?

Larvel 8 I need some help here.. I don't know where is the error? ->>> I got "null" when I wrote in the TINKER " $article->tags;" Tinker (HERS IS THE ERROR): ???????? Creating_tags_tabels.php: Tags.php: Articles.php: DB table->…
1
vote
1 answer

Change Laravel Tinker output colours?

I am wondering how to change the text output colour from Tinker. Anyone know? Or rather, is it an Ubuntu thing? I have completely removed any reference to colour 34 (dark blue) from LS_COLORS and am still receiving this with Tinker output: I would…
MichaelB
  • 175
  • 1
  • 10
1
vote
1 answer

Generate multiple records specifying the values calling Factories from Tinker in Laravel

I'm trying to figure out if it's possible to generate multiple records calling a factory with a tinker command specifying the values. At the moment I'm generating some user Teams and Roles like this. Team::factory()->create([ 'name' => 'Super…
Davide Casiraghi
  • 15,591
  • 9
  • 34
  • 56
1
vote
1 answer

What are the CRUD Commands that have to be run in Tinker with Laravel 8

When I run the known tinder CRUD Commands in Laravel 8, they aren't working What I ran was the Create and Find commands $user = new App\User; App\User::all(); But they aren't working, I knew that in Laravel 8, the Model file is in this path…
1
vote
1 answer

PHP Error: Class 'Illuminate/Foundation/Auth/Admin' [Laravel 8]

I have issues with the php error when I tried to insert data for admin using the tinker. I'm creating a multi authentication user which is one for user and one for admin. PHP Error: Class 'Illuminate/Foundation/Auth/Admin' not found in…
lily
  • 199
  • 2
  • 3
  • 14
1
vote
1 answer

Laravel - DB structure change - Is this a good practice or not?

Hello how are you? I wanted to ask you who have more experience than me if what I want to do is a good or bad practice in Laravel. I am making an ordering app and in my database I have that a product has a certain price (one more field in the…
1
vote
1 answer

when using php artisan migrate, change table name in migration, error occur when using tinker to save object

This is my migration, I m using mysql, and when I run the migration, it success and I look at my mysql DB, the table's name is "receivedDocument" as I wanted. class CreateReceivedDocumentsTable extends Migration { /** * Run the migrations. …
Percy Ip
  • 13
  • 2
1
vote
0 answers

'PHP artisan tinker' console command doesn't know HOMEDRIVE

this is my first time here. Surely not the last. I am working with Laravel and am trying to get into php artisan tinker. This is the second time I am using Laravel and tinker, after I first worked through a tutorial. Everything worked fine then.…
JohnDoe84
  • 11
  • 4
1
vote
2 answers

Cannot Install tinker Laravel 5.1

Cannot install tinker on Laravel 5.1. Composer version is 1.9.0. Here is the composer log: https://pastebin.com/aajb0m7p I tried to remove vendor folder and install back, but that doesn't help. Is there any workaround? I would like to use tinker to…
Garfield Lasaga
  • 348
  • 1
  • 5
  • 13
1
vote
2 answers

Create an array like MNIST dataset from tinker draw Python

I've created a basic tinker canva where the user is able to paint using a brush. I store all the x and y coordinates of the drawn lines in an array and then I resize them to 28x28 pixel (the size of dataset's images); somehow can I convert that…
Giacomo A.
  • 175
  • 1
  • 12
1
vote
1 answer

PHP Error: Call to undefined method stdClass::save() in Psy Shell code on line 1

I'm new in Laravel, I'm using tinker to create a record: $Profile=new \App\Profile(); => App\Profile {#3038} >>> $profile->title='Premier Titre' PHP Warning: Creating default object from empty value in Psy Shell code on line 1 >>>…
1
vote
0 answers

I am trying to run PHP artisan tinker command on the command line and it showing this error

ErrorException :mkdi<>: File exists at c:\xampp\php\codehub\vendor\spy\psysh\configuration.php:363 359: $this->runtimeDir = configpaths::getRubtimeDir<>; 360: 361: 362: if (!\is_dir($this->runtimeDir)) 363: \mkdir($this->runtimeDir, 0700,…
eddyson
  • 11
  • 1
1
vote
1 answer

Accidentaly removed u-boot from tinker board flash

I'm new to this, so I tried (and of course failed) to install a normal desktop Ubuntu on the tinker board, and now I no longer have the U-boot on the flash, so I can't access it from my computer (a windows 10 laptop). I tried to compile a new U-boot…
1
vote
1 answer

Laravel tinker text suggestion or autocomplete through the tab key

Is there any way to use Tab key to suggest or auto-complete text or predefined variables on Laravel Tinker?
Majid Alaeinia
  • 962
  • 2
  • 11
  • 27
1
vote
0 answers

I am using Tinker Board with PiCamera v2.1. How do I set the Color format for the captured image and also how to set exposure params?

I am able to capture NV12 format pictures using Tinker Board with PiCam. I am using gstreamer pipeline with v4l2src plugin to capture images as follows: gst-launch-1.0 v4l2src ! video/x-raw,format=NV12,width=1640,height=1232, framerate=20/1 !…
AK_30
  • 11
  • 2