URL Shortener
1.0
A Laravel-based URL shortener application
Chargement...
Recherche...
Aucune correspondance
ShortUrl.php
Aller à la documentation de ce fichier.
1
<?php
2
3
namespace
App\Models
;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Factories\HasFactory;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
use Illuminate\Auth\Access\HandlesAuthorization;
9
21
class
ShortUrl
extends
Model
22
{
23
use HasFactory, SoftDeletes;
24
25
protected
$fillable
= [
26
'user_id'
,
27
'code'
,
28
'original_url'
29
];
30
36
public
function
user
()
37
{
38
return
$this->belongsTo(User::class);
39
}
40
}
App\Models\ShortUrl
Definition
ShortUrl.php:22
App\Models\ShortUrl\user
user()
Get the user that owns the short URL.
Definition
ShortUrl.php:36
App\Models\ShortUrl\$fillable
$fillable
Definition
ShortUrl.php:25
App\Models
Definition
ShortUrl.php:3
app
Models
ShortUrl.php
Généré le Samedi 7 Février 2026 12:00:11 pour URL Shortener par
1.9.8