Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Available Column Types
Of course, the schema builder contains a variety of column types that you may use when building your tables:
	
$table->bigIncrements('id');	Incrementing ID (primary key) using a "UNSIGNED BIG INTEGER" equivalent.
$table->bigInteger('votes');	BIGINT equivalent for the database.
$table->binary('data');	BLOB equivalent for the database.
$table->boolean('confirmed');	BOOLEAN equivalent for the database.
$table->char('name', 4);	CHAR equivalent with a length.
$table->date('created_at');	DATE equivalent for the database.
$table->dateTime('created_at');	DATETIME equivalent for the database.
$table->decimal('amount', 5, 2);	DECIMAL equivalent with a precision and scale.
$table->double('column', 15, 8);	DOUBLE equivalent with precision, 15 digits in total and 8 after the decimal point.
$table->enum('choices', ['foo', 'bar']);	ENUM equivalent for the database.
$table->float('amount');	FLOAT equivalent for the database.
$table->increments('id');	Incrementing ID (primary key) using a "UNSIGNED INTEGER" equivalent.
$table->integer('votes');	INTEGER equivalent for the database.
$table->json('options');	JSON equivalent for the database.
$table->jsonb('options');	JSONB equivalent for the database.
$table->longText('description');	LONGTEXT equivalent for the database.
$table->mediumInteger('numbers');	MEDIUMINT equivalent for the database.
$table->mediumText('description');	MEDIUMTEXT equivalent for the database.
$table->morphs('taggable');	Adds INTEGER taggable_id and STRING taggable_type.
$table->nullableTimestamps();	Same as timestamps(), except allows NULLs.
$table->rememberToken();	Adds remember_token as VARCHAR(100) NULL.
$table->smallInteger('votes');	SMALLINT equivalent for the database.
$table->softDeletes();	Adds deleted_at column for soft deletes.
$table->string('email');	VARCHAR equivalent column.
$table->string('name', 100);	VARCHAR equivalent with a length.
$table->text('description');	TEXT equivalent for the database.
$table->time('sunrise');	TIME equivalent for the database.
$table->tinyInteger('numbers');	TINYINT equivalent for the database.
$table->timestamp('added_on');	TIMESTAMP equivalent for the database.
$table->timestamps();	Adds created_at and updated_at columns.
$table->uuid('id');	UUID equivalent for the database.
by გიორგი ბაკაშვილი
4 years ago
0
Laravel
laravel official doc
1
Press
ctrl
+
shift
+
p
, type
settings
and select
Preferences: Open Settings (JSON)
to open "User settings", and add this:
"editor.renderIndentGuides": false,
by საბა მაღლაკელიძე
4 years ago
0
visual studio code
0
Console notification types
List of all types of console notifications
console.log('console log');
console.info('console info');
console.warn('console warn');
console.error('console error');
by Valeri Tandilashvili
4 years ago
0
Postman
0
Script execution levels
Script execution levels ordered by execution time
Collection Pre
Folder Pre
Request Pre
HERE GOES REQUEST
Collection Test
Folder Test
Request Test
by Valeri Tandilashvili
4 years ago
0
Postman
0
variable levels and priorities
Variable levels list (ordered by priority - the highest at the top):
Local
Data
Environment 
Collection 
Global
by Valeri Tandilashvili
4 years ago
0
Postman
0
you can override parent static
boot
method, but you still need to call it inside
protected static function boot()
    {
        parent::boot();

        static::created(function ($user) {
            //do something with created model
        });
    }
by გიორგი უზნაძე
4 years ago
0
Laravel
Model
1
in order to have
Cache
class you need to import it
use Illuminate\Support\Facades\Cache;
$postCount = Cache::remember(
            'count.posts.' . $user->id,
            now()->addSeconds(30),
            function () use ($user) {
                return $user->posts->count();
            });
in this case the post count will be cached with different key on every user and will be retrieved by the authorized users id 2nd argument is expiration date, in this case 30 seconds in the future 3rd argument is a callback of what to do and store if cache is not found (is not set yet or 30 seconds has passed)
by გიორგი უზნაძე
4 years ago
0
Laravel
Cache
1
$font-weights: (
    "regular": 400,
    "medium": 500,
    "bold": 700
);

//now if we want to apply it we have to use 'map-get' function
body {
    font-weight: map-get($font-weights, "medium");
}
.some-class{
    font-weight: map-get($font-weights, "bold")
}
by გიორგი უზნაძე
4 years ago
0
Sass
Array
1
this command changes all
.txt
extension to
.php
ren *.txt *.php
by გიორგი უზნაძე
4 years ago
0
CMD
4
The $loop variable also contains a variety of other useful properties:
$loop->index
The index of the current loop iteration (starts at 0).
$loop->iteration
The current loop iteration (starts at 1).
$loop->remaining
The iterations remaining in the loop.
$loop->count
The total number of items in the array being iterated.
$loop->first
Whether this is the first iteration through the loop.
$loop->last
Whether this is the last iteration through the loop.
$loop->even
Whether this is an even iteration through the loop.
$loop->odd
Whether this is an odd iteration through the loop.
$loop->depth
The nesting level of the current loop.
$loop->parent
When in a nested loop, the parent's loop variable.
@foreach ($users as $user)
    @if ($loop->first)
        This is the first iteration.
    @endif

    @if ($loop->last)
        This is the last iteration.
    @endif

    <p>This is user {{ $loop->index }} ) {{ $user->id }}</p>
@endforeach
by გიორგი უზნაძე
4 years ago
0
Laravel
Blade
3
Results: 1578