LinkStack/database/seeders/ButtonSeeder.php
Julian Prieber bcc5050c35 Added Custom Website button
Added new Custom Website button which visually looks similar to the previously added Website button with an except of the icon of the new button being the favicon of the chose link. The text on the button is set with the button title, just like the Custom button.

The favicon request is performed via the Google API. The icon displays correctly in most cases, with some exceptions. I might add a function later on that displays a generic icon if no icon was found.
2022-03-18 14:59:45 +01:00

187 lines
3.0 KiB
PHP
Executable File

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\Button;
class ButtonSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$buttons = [
[
'name' => 'custom'
],
[
'name' => 'custom_website'
],
[
'name' => 'github'
],
[
'name' => 'twitter'
],
[
'name' => 'instagram'
],
[
'name' => 'facebook'
],
[
'name' => 'messenger'
],
[
'name' => 'linkedin'
],
[
'name' => 'youtube'
],
[
'name' => 'discord'
],
[
'name' => 'twitch'
],
[
'name' => 'snapchat'
],
[
'name' => 'spotify'
],
[
'name' => 'reddit'
],
[
'name' => 'medium'
],
[
'name' => 'pinterest'
],
[
'name' => 'soundcloud'
],
[
'name' => 'figma'
],
[
'name' => 'kit'
],
[
'name' => 'telegram'
],
[
'name' => 'tumblr'
],
[
'name' => 'steam'
],
[
'name' => 'vimeo'
],
[
'name' => 'wordpress'
],
[
'name' => 'goodreads'
],
[
'name' => 'skoob'
],
[
'name' => 'tiktok'
],
[
'name' => 'default email'
],
[
'name' => 'default email_alt'
],
[
'name' => 'bandcamp'
],
[
'name' => 'patreon'
],
[
'name' => 'signal'
],
[
'name' => 'venmo'
],
[
'name' => 'cashapp'
],
[
'name' => 'gitlab'
],
[
'name' => 'mastodon'
],
[
'name' => 'paypal'
],
[
'name' => 'whatsapp'
],
[
'name' => 'xing'
],
[
'name' => 'buy me a coffee'
],
[
'name' => 'website'
],
];
Button::insert($buttons);
}
}