Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MimisK13 committed Nov 6, 2023
1 parent d5c5885 commit aa4218d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ php artisan migrate
You can publish the config file with:

```bash
php artisan vendor:publish --tag=":laravel-link-config"
php artisan vendor:publish --tag=":laravel-link"
```

This is the contents of the published config file:

```php
return [
//
'table' => 'links',
];
```

Expand All @@ -44,14 +44,12 @@ return [
// Register Trait on User model.
use HasLink;

//
// Attach Link to User
$user = User::latest()->first();
$user->link()->create([
'url' => 'https://www.user.com'
]);
$user->attachLink($url = 'https://portfolio.com');

$user->with('link')->get();
$user->link->url;
// Delete Link
$user->deleteLink('https://portfolio.com');
```

## Testing
Expand Down

0 comments on commit aa4218d

Please sign in to comment.