├── public ├── favicon.ico ├── robots.txt ├── assets │ ├── images │ │ ├── favicon.png │ │ ├── logo-dark.png │ │ ├── logo-color.png │ │ ├── leakedearly-color.png │ │ └── leakedearly-dark.png │ ├── fonts │ │ ├── font-awesome │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ └── proximanova │ │ │ ├── proximanova-bold.eot │ │ │ ├── proximanova-bold.ttf │ │ │ ├── proximanova-bold.woff │ │ │ ├── proximanova-extrabold.eot │ │ │ ├── proximanova-extrabold.ttf │ │ │ ├── proximanova-regular.ttf │ │ │ ├── proximanova-regular.woff │ │ │ ├── proximanova-semibold.eot │ │ │ ├── proximanova-semibold.ttf │ │ │ ├── proximanova-semibold.woff │ │ │ ├── proximanova-extrabold.woff │ │ │ ├── proxima-nova-5967ed2b9b2b1.otf │ │ │ ├── proximanova-regularitalic.eot │ │ │ ├── proximanova-regularitalic.ttf │ │ │ └── proximanova-regularitalic.woff │ └── javascripts │ │ ├── main.min.js │ │ └── jquery.sticky.min.js ├── .htaccess ├── web.config ├── index.php └── vendor │ └── sitemap │ └── styles │ ├── mobile.xsl │ ├── sitemapindex.xsl │ ├── xml.xsl │ └── google-news.xsl ├── database ├── .gitignore ├── seeds │ └── DatabaseSeeder.php ├── migrations │ ├── 2017_08_02_004716_create_password_resets_table.php │ ├── 2017_08_02_004716_create_genres_table.php │ ├── 2017_08_02_004718_add_foreign_keys_to_albums_table.php │ ├── 2017_08_02_004718_add_foreign_keys_to_tracks_table.php │ ├── 2017_08_02_004718_add_foreign_keys_to_videos_table.php │ ├── 2017_08_02_004718_add_foreign_keys_to_mixtapes_table.php │ ├── 2017_08_02_004716_create_pages_table.php │ ├── 2017_08_02_004716_create_scrape_links_table.php │ ├── 2017_08_02_011515_create_page_visits_table.php │ ├── 2017_08_02_004716_create_videos_table.php │ ├── 2017_08_02_004716_create_tracks_table.php │ ├── 2017_08_02_004716_create_albums_table.php │ └── 2017_08_02_004716_create_mixtapes_table.php └── factories │ └── ModelFactory.php ├── bootstrap ├── cache │ └── .gitignore ├── autoload.php └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── resources ├── views │ ├── blocks │ │ ├── popads.blade.php │ │ ├── latest-tracks.blade.php │ │ ├── latest-albums.blade.php │ │ ├── latest-mixtapes.blade.php │ │ ├── latest-videos.blade.php │ │ ├── footer.blade.php │ │ └── header.blade.php │ ├── vendor │ │ └── sitemap │ │ │ ├── txt.php │ │ │ ├── xml-mobile.php │ │ │ ├── sitemapindex.php │ │ │ ├── html.php │ │ │ ├── ror-rss.php │ │ │ ├── ror-rdf.php │ │ │ ├── google-news.php │ │ │ └── xml.php │ ├── widgets │ │ ├── popular │ │ │ ├── block.blade.php │ │ │ └── widget.blade.php │ │ ├── comments │ │ │ └── widget.blade.php │ │ ├── more │ │ │ ├── block.blade.php │ │ │ └── widget.blade.php │ │ └── related │ │ │ ├── widget.blade.php │ │ │ └── block.blade.php │ ├── index.blade.php │ ├── pages │ │ └── view.blade.php │ ├── albums │ │ ├── blocks │ │ │ └── track.blade.php │ │ ├── block.blade.php │ │ ├── browse.blade.php │ │ ├── track.blade.php │ │ └── view.blade.php │ ├── mixtapes │ │ ├── blocks │ │ │ └── track.blade.php │ │ ├── block.blade.php │ │ ├── browse.blade.php │ │ └── track.blade.php │ ├── tracks │ │ ├── block.blade.php │ │ ├── browse.blade.php │ │ └── view.blade.php │ ├── videos │ │ ├── block.blade.php │ │ ├── browse.blade.php │ │ └── view.blade.php │ ├── search │ │ ├── tracks.blade.php │ │ ├── albums.blade.php │ │ ├── videos.blade.php │ │ ├── mixtapes.blade.php │ │ └── index.blade.php │ ├── layouts │ │ └── app.blade.php │ ├── welcome.blade.php │ └── install │ │ └── import.blade.php ├── assets │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── js │ │ ├── components │ │ └── Example.vue │ │ ├── app.js │ │ └── bootstrap.js └── lang │ └── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── .gitattributes ├── app ├── Page.php ├── Genre.php ├── ScrapeLink.php ├── Album.php ├── Track.php ├── Video.php ├── Mixtape.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── PagesController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── RegisterController.php │ │ ├── TracksController.php │ │ ├── VideosController.php │ │ ├── AlbumsController.php │ │ ├── MixtapesController.php │ │ ├── ImageController.php │ │ └── SearchController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Helpers │ └── global.php └── Exceptions │ └── Handler.php ├── .gitignore ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── CreatesApplication.php └── Feature │ └── ExampleTest.php ├── config ├── sitemap.php ├── view.php ├── services.php ├── page-visits-counter.php ├── broadcasting.php ├── filesystems.php ├── queue.php ├── cache.php ├── auth.php ├── database.php └── mail.php ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── webpack.mix.js ├── server.php ├── .env.example ├── .env ├── LICENSE ├── package.json ├── phpunit.xml ├── composer.json ├── artisan └── README.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/views/blocks/popads.blade.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/txt.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tyler, The Creator 4 | Scum Fuck Flower Boy 5 | 6 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 10 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Album.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Genre'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Track.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Genre'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Video.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Genre'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /resources/views/widgets/comments/widget.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Comments

4 |
5 |
6 |
7 |
8 |
-------------------------------------------------------------------------------- /resources/views/widgets/more/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | {{ $album->artist }} 4 | {{ $track->name }} 5 | 6 |
  • -------------------------------------------------------------------------------- /app/Mixtape.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Genre'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /config/sitemap.php: -------------------------------------------------------------------------------- 1 | false, 6 | 'cache_key' => 'laravel-sitemap.' . config('app.url'), 7 | 'cache_duration' => 3600, 8 | 'escaping' => true, 9 | 'use_limit_size' => false, 10 | 'max_size' => null, 11 | 'use_styles' => true, 12 | 'styles_location' => null, 13 | ]; -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 5 | @include('blocks.latest-videos') 6 |
    7 | @include('blocks.latest-tracks') 8 | @include('blocks.latest-albums') 9 | @include('blocks.latest-mixtapes') 10 |
    11 | 14 | 15 | @endsection 16 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/xml-mobile.php: -------------------------------------------------------------------------------- 1 | '."\n" ?> 2 | '."\n"; ?> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/blocks/latest-tracks.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Latest Tracks

    4 | 5 | All 6 | 7 |
    8 | 13 |
    -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |

    Latest Albums

    4 | 5 | All 6 | 7 |
    8 | 13 | -------------------------------------------------------------------------------- /resources/views/widgets/popular/widget.blade.php: -------------------------------------------------------------------------------- 1 | sortBy('page_visits_7d')->take(5); 8 | break; 9 | } 10 | }); 11 | */ 12 | ?> 13 | -------------------------------------------------------------------------------- /resources/views/blocks/latest-mixtapes.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Latest Mixtapes

    4 | 5 | All 6 | 7 |
    8 | 13 |
    -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 20 | 21 | $response->assertStatus(200); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /resources/views/blocks/latest-videos.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Latest Videos

    4 | 5 | All 6 | 7 |
    8 | 13 |
    -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/sitemapindex.php: -------------------------------------------------------------------------------- 1 | '."\n"; ?> 2 | '."\n"; ?> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/Http/Controllers/PagesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 18 | } 19 | 20 | public function view($slug) 21 | { 22 | $page = Page::where('slug',$slug)->firstOrFail(); 23 | return view('pages.view', ['page'=>$page]); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/html.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <?= $channel['title'] ?> 5 | 6 | 7 |

    8 | 16 | 17 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | let mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /resources/views/pages/view.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $page->title.' | '.env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 |
    9 |
    10 |

    {{ $page->title }}

    11 |
    12 |

    {!! $page->content !!}

    13 | 14 |
    15 |
    16 | 19 |
    20 | @endsection 21 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL=http://localhost 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=homestead 12 | DB_USERNAME=homestead 13 | DB_PASSWORD=secret 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | QUEUE_DRIVER=sync 19 | 20 | REDIS_HOST=127.0.0.1 21 | REDIS_PASSWORD=null 22 | REDIS_PORT=6379 23 | 24 | MAIL_DRIVER=smtp 25 | MAIL_HOST=smtp.mailtrap.io 26 | MAIL_PORT=2525 27 | MAIL_USERNAME=null 28 | MAIL_PASSWORD=null 29 | MAIL_ENCRYPTION=null 30 | 31 | PUSHER_APP_ID= 32 | PUSHER_APP_KEY= 33 | PUSHER_APP_SECRET= 34 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * Next, we will create a fresh Vue application instance and attach it to 14 | * the page. Then, you may begin adding components to this application 15 | * or customize the JavaScript scaffolding to fit your unique needs. 16 | */ 17 | 18 | Vue.component('example', require('./components/Example.vue')); 19 | 20 | const app = new Vue({ 21 | el: '#app' 22 | }); 23 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/ror-rss.php: -------------------------------------------------------------------------------- 1 | '."\n"; ?> 2 | 3 | 4 | <?= $channel['title'] ?> 5 | 6 | 7 | 8 | 9 | <?= $item['title'] ?> 10 | 11 | 12 | 13 | sitemap 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email', 191)->index(); 18 | $table->string('token', 191); 19 | $table->dateTime('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::drop('password_resets'); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/widgets/related/widget.blade.php: -------------------------------------------------------------------------------- 1 | where('id','!=',$track->id)->orderBy('created_at','desc')->limit(5)->get(); 8 | break; 9 | } 10 | ?> 11 | -------------------------------------------------------------------------------- /app/Helpers/global.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('enabled','disabled')); 19 | $table->string('name', 191); 20 | $table->string('slug', 191); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('genres'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/ror-rdf.php: -------------------------------------------------------------------------------- 1 | '."\n"; ?> 2 | 3 | 4 | <?= $channel['title'] ?> 5 | 6 | sitemap 7 | 8 | 9 | 10 | 11 | <?= $item['title'] ?> 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004718_add_foreign_keys_to_albums_table.php: -------------------------------------------------------------------------------- 1 | foreign('genre_id')->references('id')->on('genres')->onUpdate('RESTRICT')->onDelete('RESTRICT'); 18 | }); 19 | } 20 | 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('albums', function(Blueprint $table) 30 | { 31 | $table->dropForeign('albums_genre_id_foreign'); 32 | }); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004718_add_foreign_keys_to_tracks_table.php: -------------------------------------------------------------------------------- 1 | foreign('genre_id')->references('id')->on('genres')->onUpdate('RESTRICT')->onDelete('RESTRICT'); 18 | }); 19 | } 20 | 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('tracks', function(Blueprint $table) 30 | { 31 | $table->dropForeign('tracks_genre_id_foreign'); 32 | }); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004718_add_foreign_keys_to_videos_table.php: -------------------------------------------------------------------------------- 1 | foreign('genre_id')->references('id')->on('genres')->onUpdate('RESTRICT')->onDelete('RESTRICT'); 18 | }); 19 | } 20 | 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('videos', function(Blueprint $table) 30 | { 31 | $table->dropForeign('videos_genre_id_foreign'); 32 | }); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004718_add_foreign_keys_to_mixtapes_table.php: -------------------------------------------------------------------------------- 1 | foreign('genre_id')->references('id')->on('genres')->onUpdate('RESTRICT')->onDelete('RESTRICT'); 18 | }); 19 | } 20 | 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('mixtapes', function(Blueprint $table) 30 | { 31 | $table->dropForeign('mixtapes_genre_id_foreign'); 32 | }); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /resources/views/albums/blocks/track.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ $track->name }} 9 | 10 | 14 | 15 |
  • -------------------------------------------------------------------------------- /resources/views/mixtapes/blocks/track.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ $track->name }} 9 | 10 | 14 | 15 |
  • -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_pages_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('title', 191); 19 | $table->string('slug', 191); 20 | $table->text('keywords', 65535); 21 | $table->text('description', 65535); 22 | $table->text('content', 16777215); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::drop('pages'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /resources/views/blocks/footer.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_scrape_links_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('queue','processing','finished'))->default('queue'); 19 | $table->enum('type', array('track','album','mixtape','video','spanish')); 20 | $table->string('href', 191)->unique('href'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('scrape_links'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | APP_NAME="Laravel" 2 | APP_ENV=local 3 | APP_KEY=base64:q3/Pl9ZvVFRcSxtHX3i8TUeTNLymK5jVccVJ4eV103k= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL="http://localhost" 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST="127.0.0.1" 10 | DB_PORT="3306" 11 | DB_DATABASE="homestead" 12 | DB_USERNAME="homestead" 13 | DB_PASSWORD="secret" 14 | 15 | META_KEYWORDS="" 16 | META_DESCRIPTION="" 17 | META_OG_TYPE="website" 18 | META_OG_IMAGE="" 19 | META_TITLE="" 20 | 21 | SITEMAP_ITEM_LIMIT=500 22 | 23 | LE_API_KEY="" 24 | DMCA_EMAIL="" 25 | 26 | BROADCAST_DRIVER=log 27 | CACHE_DRIVER=file 28 | SESSION_DRIVER=file 29 | QUEUE_DRIVER=sync 30 | 31 | REDIS_HOST=127.0.0.1 32 | REDIS_PASSWORD=null 33 | REDIS_PORT=6379 34 | 35 | MAIL_DRIVER=smtp 36 | MAIL_HOST=smtp.mailtrap.io 37 | MAIL_PORT=2525 38 | MAIL_USERNAME=null 39 | MAIL_PASSWORD=null 40 | MAIL_ENCRYPTION=null 41 | 42 | PUSHER_APP_ID= 43 | PUSHER_APP_KEY= 44 | PUSHER_APP_SECRET= 45 | -------------------------------------------------------------------------------- /resources/views/tracks/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | @if( $track->created_at->diffInHours( \Carbon\Carbon::now() ) <= 4 ) 4 | New 5 | @endif 6 | 7 | 8 | {{ $track->artist }} - {{ $track->name }} 9 | 10 | 11 | {{ $track->genre->name }}, 12 | 13 | 14 | 15 | 16 |
  • -------------------------------------------------------------------------------- /resources/views/widgets/related/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | @if( $related->created_at->diffInHours( \Carbon\Carbon::now() ) <= 4 ) 4 | New 5 | @endif 6 | {{ $related->artist }} - {{ $related->name }} 7 | 8 | {{ $related->genre->name }}, 9 | 10 | 11 | 12 | 13 |
  • -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /resources/views/albums/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | {{ $album->artist.' - '.$album->name }} 4 |
    {{ $album->artist }} - {{ $album->name }}
    5 |
    6 |
    7 | , 8 | {{ $album->genre->name }} 9 |
    10 | 11 | 12 |
  • -------------------------------------------------------------------------------- /resources/views/tracks/browse.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title','Free HipHop Mp3 Downloads '.(Request::has('page')?'- Page '.Request::input('page').' ' : '').'| '.env('APP_NAME') ) 4 | @section('og_url',url('tracks')) 5 | 6 | @section('content') 7 |
    8 |
    9 |
    10 |
    11 |

    Tracks

    12 |
    13 |
      14 | @foreach( $tracks AS $track ) 15 | @include('tracks.block') 16 | @endforeach 17 |
    18 | {{ $tracks->links() }} 19 |
    20 |
    21 | 24 |
    25 | @endsection 26 | -------------------------------------------------------------------------------- /resources/views/albums/browse.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title','Free HipHop Album Downloads '.(Request::has('page')?'- Page '.Request::input('page').' ' : '').'| '.env('APP_NAME') ) 4 | @section('og_url',url('tracks')) 5 | 6 | @section('content') 7 |
    8 |
    9 |
    10 |
    11 |

    Albums

    12 |
    13 |
      14 | @foreach( $albums AS $album ) 15 | @include('albums.block') 16 | @endforeach 17 |
    18 | {{ $albums->links() }} 19 |
    20 |
    21 | 24 |
    25 | @endsection 26 | -------------------------------------------------------------------------------- /resources/views/mixtapes/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | {{ $mixtape->artist.' - '.$mixtape->name }} 4 |
    {{ $mixtape->artist }} - {{ $mixtape->name }}
    5 |
    6 |
    7 | , 8 | {{ $mixtape->genre->name }} 9 |
    10 | 11 | 12 |
  • -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #fff; 39 | -------------------------------------------------------------------------------- /resources/views/mixtapes/browse.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title','Free HipHop Mixtape Downloads '.(Request::has('page')?'- Page '.Request::input('page').' ' : '').'| '.env('APP_NAME') ) 4 | @section('og_url',url('tracks')) 5 | 6 | @section('content') 7 |
    8 |
    9 |
    10 |
    11 |

    Mixtapes

    12 |
    13 |
      14 | @foreach( $mixtapes AS $mixtape ) 15 | @include('mixtapes.block') 16 | @endforeach 17 |
    18 | {{ $mixtapes->links() }} 19 |
    20 |
    21 | 24 |
    25 | @endsection 26 | -------------------------------------------------------------------------------- /resources/views/videos/block.blade.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | 4 | {{ $video->artist }} - {{ $video->name }} 5 | {{ $video->artist . ' - ' . $video->name }} 6 |
    7 |
    8 | , 9 | {{ $video->genre->name }} 10 |
    11 |
    12 | 13 |
  • -------------------------------------------------------------------------------- /resources/views/videos/browse.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title','Free Video Stream '.(Request::has('page')?'- Page '.Request::input('page').' ' : '').'| '.env('APP_NAME') ) 4 | @section('og_url',url('videos')) 5 | 6 | @section('content') 7 |
    8 |
    9 |
    10 |
    11 |

    Videos

    12 |
    13 |
      14 | @foreach( $videos AS $video ) 15 | @include('videos.block') 16 | @endforeach 17 |
    18 | {{ $videos->links() }} 19 |
    20 |
    21 | 24 |
    25 | @endsection 26 | -------------------------------------------------------------------------------- /public/assets/javascripts/main.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){$("audio").audioPlayer({classPrefix:"audioplayer",strPlay:'',strPause:'',strVolume:''}),$(".player-init.playlist").audioPlayer({playlist:!0,classPrefix:"audioplayer",strPlay:'',strPause:'',strVolume:''}),$(".mobile-actions").click(function(){var a=$(this),s=a.data("target"),t=$(s);t.is(":visible")?t.slideUp():t.slideDown()}),$("section#sidebar").sticky({topSpacing:20,bottomSpacing:155,widthFromWrapper:!0,wrapperClassName:"sidebar-sticky"}),$("#go-up").click(function(a){$("html, body").animate({scrollTop:0},"slow"),a.preventDefault()}),$(".like, .dislike").click(function(a){var s=$(this),t=s.data("action"),i=s.find("span.count"),e=s.parent(),l=e.data("media"),n=e.data("media-id"),p=e.data("url"),o=e.data("token");$.post(p,{media_type:l,media_id:n,action:t,_token:o},function(a){"ok"==a.status&&(s.addClass("active"),e.addClass("disabled"),i.text(a.votes))},"json"),a.preventDefault()})}); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 scrapewww 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.16.2", 14 | "bootstrap-sass": "^3.3.7", 15 | "cross-env": "^5.0.1", 16 | "jquery": "^3.1.1", 17 | "laravel-mix": "^1.0", 18 | "lodash": "^4.17.4", 19 | "vue": "^2.1.10" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_011515_create_page_visits_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 20 | 21 | $table->bigInteger('visitable_id')->unsigned(); 22 | $table->string('visitable_type'); 23 | 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | $pageVisitsTableName = config('page-visits-counter.page_visits_table_name', 'page-visits'); 36 | 37 | Schema::dropIfExists(pageVisitsTableName); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_videos_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('enabled','disabled')); 19 | $table->integer('genre_id')->unsigned()->index('videos_genre_id_foreign'); 20 | $table->string('slug', 191); 21 | $table->string('artist', 191); 22 | $table->string('name', 191); 23 | $table->string('image', 191); 24 | $table->text('preview', 65535); 25 | $table->text('additional', 65535)->nullable(); 26 | $table->text('keywords', 65535)->nullable(); 27 | $table->text('og_twitter_image_alt', 65535)->nullable(); 28 | $table->integer('origin')->unsigned()->nullable(); 29 | $table->timestamps(); 30 | $table->boolean('processed')->default(0); 31 | }); 32 | } 33 | 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::drop('videos'); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Controllers/TracksController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 21 | } 22 | 23 | /** 24 | * Show the application dashboard. 25 | * 26 | * @return \Illuminate\Http\Response 27 | */ 28 | public function view($slug) 29 | { 30 | $track = Track::where('status','enabled')->where('slug',$slug)->firstOrFail(); 31 | 32 | //$track->addVisitThatExpiresAt(Carbon::now()->addHours(3)); 33 | $track->addVisit(); 34 | 35 | $image = Image::make( storage_path('app/public/images/track/'.$track->image) ); 36 | 37 | return view('tracks.view', ['track'=>$track,'image'=>$image]); 38 | } 39 | 40 | public function browse(Request $request) 41 | { 42 | $tracks = Track::where('status','enabled')->orderBy('created_at','desc')->paginate(20); 43 | return view('tracks.browse', ['tracks'=>$tracks]); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /config/page-visits-counter.php: -------------------------------------------------------------------------------- 1 | Cyrildewit\PageVisitsCounter\Models\PageVisit::class, 9 | 10 | /* 11 | * The table name of the page visits database table. 12 | * It is used by creating the migrations files and default Eloquent model. 13 | */ 14 | 'page_visits_table_name' => 'page-visits', 15 | 16 | /* 17 | * The key thas used to store page visits into the session. This is used by 18 | * the SessionHistory class that handles the visits with expiry dates. 19 | */ 20 | 'page_visits_history_session_key' => 'page-visits-counter.history', 21 | 22 | /* 23 | * Number format output settings. 24 | */ 25 | 'output-settings' => [ 26 | 27 | /* 28 | * The configured option values will be used 29 | * inside the official php `number_format()` function. 30 | * 31 | * Example: 120000 ==> 120.000 32 | * Example: 500206000 ==> 502.006.000 33 | */ 34 | 'format-options' => [ 35 | 36 | 'decimals' => 0, 37 | 'dec_point' => ',', 38 | 'thousands_sep' => '.', 39 | 40 | ], 41 | 42 | ], 43 | 44 | ]; 45 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_tracks_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('enabled','disabled')); 19 | $table->integer('genre_id')->unsigned()->index('tracks_genre_id_foreign'); 20 | $table->string('slug', 191); 21 | $table->string('artist', 191); 22 | $table->string('name', 191); 23 | $table->string('image', 191); 24 | $table->text('download', 65535); 25 | $table->text('preview', 65535); 26 | $table->text('additional', 65535)->nullable(); 27 | $table->text('keywords', 65535)->nullable(); 28 | $table->text('og_twitter_image_alt', 65535)->nullable(); 29 | $table->integer('origin')->unsigned()->nullable(); 30 | $table->timestamps(); 31 | $table->boolean('processed')->default(0); 32 | }); 33 | } 34 | 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::drop('tracks'); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_albums_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('enabled','disabled')); 19 | $table->integer('genre_id')->unsigned()->index('albums_genre_id_foreign'); 20 | $table->string('slug', 191); 21 | $table->string('artist', 191); 22 | $table->string('name', 191); 23 | $table->string('image', 191); 24 | $table->text('download', 65535); 25 | $table->text('tracks', 16777215); 26 | $table->text('additional', 65535)->nullable(); 27 | $table->text('keywords', 65535)->nullable(); 28 | $table->text('og_twitter_image_alt', 65535)->nullable(); 29 | $table->integer('origin')->unsigned()->nullable(); 30 | $table->timestamps(); 31 | $table->boolean('processed')->default(0); 32 | }); 33 | } 34 | 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::drop('albums'); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /database/migrations/2017_08_02_004716_create_mixtapes_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->enum('status', array('enabled','disabled')); 19 | $table->integer('genre_id')->unsigned()->index('mixtapes_genre_id_foreign'); 20 | $table->string('slug', 191); 21 | $table->string('artist', 191); 22 | $table->string('name', 191); 23 | $table->string('image', 191); 24 | $table->text('download', 65535); 25 | $table->text('tracks', 16777215); 26 | $table->text('additional', 65535)->nullable(); 27 | $table->text('keywords', 65535)->nullable(); 28 | $table->text('og_twitter_image_alt', 65535)->nullable(); 29 | $table->integer('origin')->unsigned()->nullable(); 30 | $table->timestamps(); 31 | $table->boolean('processed')->default(0); 32 | }); 33 | } 34 | 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::drop('mixtapes'); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /resources/views/search/tracks.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Searching tracks for ' . Request::input('q') . ' | ' . env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 | 22 |
    23 | 26 |
    27 | @endsection 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/VideosController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 22 | } 23 | 24 | /** 25 | * Show the application dashboard. 26 | * 27 | * @return \Illuminate\Http\Response 28 | */ 29 | public function view($slug) 30 | { 31 | $video = Video::where('status','enabled')->where('slug',$slug)->firstOrFail(); 32 | 33 | //$track->addVisitThatExpiresAt(Carbon::now()->addHours(3)); 34 | $video->addVisit(); 35 | 36 | $image = Image::make( storage_path('app/public/images/video/'.$video->image) ); 37 | 38 | return view('videos.view', ['video'=>$video,'image'=>$image]); 39 | } 40 | 41 | public function browse(Request $request) 42 | { 43 | $videos = Video::where('status','enabled')->orderBy('created_at','desc')->paginate(12); 44 | 45 | return view('videos.browse', ['videos'=>$videos]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Controllers/AlbumsController.php: -------------------------------------------------------------------------------- 1 | where('slug',$slug)->firstOrFail(); 14 | $album->addVisit(); 15 | $image = Image::make( storage_path('app/public/images/album/'.$album->image) ); 16 | return view('albums.view', ['album'=>$album,'image'=>$image]); 17 | } 18 | 19 | public function viewTrack($slug1,$slug2,$slug3) 20 | { 21 | $album = Album::where('status','enabled')->where('slug',$slug1)->firstOrFail(); 22 | $tracks = json_decode( $album->tracks, true ); 23 | $track_id = $slug2-1; 24 | $track = $tracks[ $track_id ]; 25 | $image = Image::make( storage_path('app/public/images/album/'.$album->image) ); 26 | return view('albums.track', ['album'=>$album,'track'=>$track,'track_id'=>$track_id,'image'=>$image]); 27 | } 28 | 29 | public function browse(Request $request) 30 | { 31 | $albums = Album::where('status','enabled')->orderBy('created_at','desc')->paginate(12); 32 | return view('albums.browse', ['albums'=>$albums]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/search/albums.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Searching albums for ' . Request::input('q') . ' | ' . env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 |
    9 |
    10 |

    Albums results

    11 | 12 | All 13 | 14 |
    15 |
      16 | @foreach($albums AS $album) 17 | @include('albums.block') 18 | @endforeach 19 |
    20 | {{ $albums->links() }} 21 |
    22 |
    23 | 26 |
    27 | @endsection 28 | -------------------------------------------------------------------------------- /resources/views/search/videos.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Searching videos for ' . Request::input('q') . ' | ' . env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 |
    9 |
    10 |

    Videos results

    11 | 12 | All 13 | 14 |
    15 |
      16 | @foreach($videos AS $video) 17 | @include('videos.block') 18 | @endforeach 19 |
    20 | {{ $videos->links() }} 21 |
    22 |
    23 | 26 |
    27 | @endsection 28 | -------------------------------------------------------------------------------- /resources/views/search/mixtapes.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Searching mixtapes for ' . Request::input('q') . ' | ' . env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 |
    9 |
    10 |

    Mixtapes results

    11 | 12 | All 13 | 14 |
    15 |
      16 | @foreach($mixtapes AS $mixtape) 17 | @include('mixtapes.block') 18 | @endforeach 19 |
    20 | {{ $mixtapes->links() }} 21 |
    22 |
    23 | 26 |
    27 | @endsection 28 | -------------------------------------------------------------------------------- /resources/views/blocks/header.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 | 8 | 11 |
    12 | 21 | 25 |
    26 |
    -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=5.6.4", 9 | "cyrildewit/laravel-page-visits-counter": "^0.1.6", 10 | "intervention/image": "^2.4", 11 | "laravel/framework": "5.4.*", 12 | "laravel/tinker": "~1.0", 13 | "roumen/sitemap": "^2.6" 14 | }, 15 | "require-dev": { 16 | "fzaninotto/faker": "~1.4", 17 | "mockery/mockery": "0.9.*", 18 | "phpunit/phpunit": "~5.7" 19 | }, 20 | "autoload": { 21 | "classmap": [ 22 | "database" 23 | ], 24 | "psr-4": { 25 | "App\\": "app/" 26 | }, 27 | "files": [ 28 | "app/Helpers/global.php" 29 | ] 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "Tests\\": "tests/" 34 | } 35 | }, 36 | "scripts": { 37 | "post-root-package-install": [ 38 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 39 | ], 40 | "post-create-project-cmd": [ 41 | "php artisan key:generate" 42 | ], 43 | "post-install-cmd": [ 44 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 45 | "php artisan optimize" 46 | ], 47 | "post-update-cmd": [ 48 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 49 | "php artisan optimize" 50 | ] 51 | }, 52 | "config": { 53 | "preferred-install": "dist", 54 | "sort-packages": true, 55 | "optimize-autoloader": true 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap-sass'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Next we will register the CSRF Token as a common header with Axios so that 28 | * all outgoing HTTP requests automatically have it attached. This is just 29 | * a simple convenience so we don't have to attach every token manually. 30 | */ 31 | 32 | let token = document.head.querySelector('meta[name="csrf-token"]'); 33 | 34 | if (token) { 35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 36 | } else { 37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 38 | } 39 | 40 | /** 41 | * Echo exposes an expressive API for subscribing to channels and listening 42 | * for events that are broadcast by Laravel. Echo and event broadcasting 43 | * allows your team to easily build robust real-time web applications. 44 | */ 45 | 46 | // import Echo from 'laravel-echo' 47 | 48 | // window.Pusher = require('pusher-js'); 49 | 50 | // window.Echo = new Echo({ 51 | // broadcaster: 'pusher', 52 | // key: 'your-pusher-key' 53 | // }); 54 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running, we will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/MixtapesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 23 | } 24 | 25 | /** 26 | * Show the application dashboard. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function view($slug) 31 | { 32 | $mixtape = Mixtape::where('status','enabled')->where('slug',$slug)->firstOrFail(); 33 | 34 | //$mixtape->addVisitThatExpiresAt(Carbon::now()->addHours(3)); 35 | $mixtape->addVisit(); 36 | 37 | $image = Image::make( storage_path('app/public/images/mixtape/'.$mixtape->image) ); 38 | 39 | return view('mixtapes.view', ['mixtape'=>$mixtape,'image'=>$image]); 40 | } 41 | 42 | public function viewTrack($slug1,$slug2,$slug3) 43 | { 44 | $mixtape = Mixtape::where('status','enabled')->where('slug',$slug1)->firstOrFail(); 45 | $tracks = json_decode( $mixtape->tracks, true ); 46 | $track_id = $slug2-1; 47 | $track = $tracks[ $track_id ]; 48 | 49 | $image = Image::make( storage_path('app/public/images/mixtape/'.$mixtape->image) ); 50 | 51 | return view('mixtapes.track', ['mixtape'=>$mixtape,'track'=>$track,'track_id'=>$track_id,'image'=>$image]); 52 | } 53 | 54 | public function browse(Request $request) 55 | { 56 | $mixtapes = Mixtape::where('status','enabled')->orderBy('created_at','desc')->paginate(12); 57 | 58 | return view('mixtapes.browse', ['mixtapes'=>$mixtapes]); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels great to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|string|max:255', 52 | 'email' => 'required|string|email|max:255|unique:users', 53 | 'password' => 'required|string|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return \App\User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/google-news.php: -------------------------------------------------------------------------------- 1 | '."\n" ?> 2 | '."\n"; ?> 3 | 4 | 5 | 6 | 7 | ' . date('Y-m-d\TH:i:sP', strtotime($item['lastmod'])) . '' . "\n"; 10 | } 11 | ?> 12 | ' . "\n"; 16 | } 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ' . $item['googlenews']['access'] . '' . "\n"; 29 | } 30 | 31 | if (isset($item['googlenews']['keywords'])) { 32 | echo "\t\t" . '' . implode(',', $item['googlenews']['keywords']) . '' . "\n"; 33 | } 34 | 35 | if (isset($item['googlenews']['genres'])) { 36 | echo "\t\t" . '' . implode(',', $item['googlenews']['genres']) . '' . "\n"; 37 | } 38 | 39 | if (isset($item['googlenews']['stock_tickers'])) { 40 | echo "\t\t" . '' . implode(',', $item['googlenews']['stock_tickers']) . '' . "\n"; 41 | } 42 | ?> 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 60 | return response()->json(['error' => 'Unauthenticated.'], 401); 61 | } 62 | 63 | return redirect()->guest(route('login')); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 30 | \App\Http\Middleware\EncryptCookies::class, 31 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 32 | \Illuminate\Session\Middleware\StartSession::class, 33 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 34 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 35 | \App\Http\Middleware\VerifyCsrfToken::class, 36 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 37 | ], 38 | 39 | 'api' => [ 40 | 'throttle:60,1', 41 | 'bindings', 42 | ], 43 | ]; 44 | 45 | /** 46 | * The application's route middleware. 47 | * 48 | * These middleware may be assigned to groups or used individually. 49 | * 50 | * @var array 51 | */ 52 | protected $routeMiddleware = [ 53 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 54 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 55 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 56 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 57 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 58 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 59 | ]; 60 | } 61 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @yield('title', env('META_TITLE')) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | @stack('head_ads') 28 | 29 | 30 |
    31 | @include('blocks.header') 32 |
    33 | @yield('content') 34 |
    35 |
    36 | @include('blocks.footer') 37 | 38 | 39 | 40 | 41 | @stack('scripts') 42 | 43 | 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [https://mp3foo.com](https://mp3foo.com "Mp3 Search Engine") 2 | 3 | # Automated Music Site 4 | Automated music download platform using Laravel 5.4. 5 | 6 | Exact clone of [http://www.leakedearly.com](http://www.leakedearly.com "Hip Hop MP3 Download") 100% automated. 7 | 8 | # Laravel 5.4 based automated music download platform. 9 | To install upload files to server, you may need to change your DocumentRoot to reflect the public directory provided in script. 10 | 11 | # Requirements 12 | - PHP >= 5.6.4 13 | - OpenSSL PHP Extension 14 | - PDO PHP Extension 15 | - Mbstring PHP Extension 16 | - Tokenizer PHP Extension 17 | - XML PHP Extension 18 | - Fileinfo Extension 19 | 20 | # Installation 21 | - Make bootstrap/cache directory and all it's contents writable (777). 22 | - Make storage directory and all directories within it writable (777). 23 | 24 | Visit yoursite.com and you'll be prompted with an install wizard. 25 | 26 | After you complete the wizard set the your cron job correctly. 27 | ``` 28 | * * * * * php /path-to-this-script/artisan schedule:run >> /dev/null 2>&1 29 | ``` 30 | thanks to: 31 | - Intervention Image (https://github.com/Intervention/image) 32 | - Laravel Page Visit Counter (https://github.com/cyrildewit/laravel-page-visits-counter) 33 | - laravel-sitemap package (https://github.com/RoumenDamianoff/laravel-sitemap) 34 | - php-curl (https://github.com/anlutro/php-curl) 35 | 36 | # How TF do I install this on cPanel? 37 | Create a directory named "clone" at the same level as public_html. i.e. 38 | - domain.com 39 | - clone 40 | - public_html 41 | 42 | Now upload the script files into the clone directory. 43 | 44 | Using SSH cd to /var/www/yourdomain.com, delete your public_html directory and replace it with a shortcut leading to clone/public. 45 | ``` 46 | cd /var/www/yourdomain.com 47 | rm -rf public_html 48 | ln -s clone/public/ public_html 49 | ``` 50 | 51 | # If you use the script buy me a beer or a spliff! 52 | Bitcoin: 1HXARUmfLSwyqyMC2yTAktwQh61SVFCQaN 53 | 54 | # Need help? 55 | Add me on Skype! Username: AmbitionPHP or on BHW username [selfpaidinc](https://www.blackhatworld.com/members/selfpaidinc.786559/) 56 | 57 | # F help, install it for me! 58 | $20 via bitcoin and I'll install it for you. Must have vps, dedicated, aws, etc that meets the above requirements. 59 | 60 | # Install Wizard Preview 61 | Step 1 62 | ![Install Wizard Step 1](http://i.imgur.com/PXtEFaR.png) 63 | 64 | Step 2 65 | ![Install Wizard Step 2](http://i.imgur.com/rV8klN9.png) 66 | 67 | Wizard Finished 68 | ![Platform Homepage](http://i.imgur.com/9eQCHar.jpg) 69 | -------------------------------------------------------------------------------- /app/Http/Controllers/ImageController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 22 | } 23 | 24 | /** 25 | * Show the application dashboard. 26 | * 27 | * @return \Illuminate\Http\Response 28 | */ 29 | public function trackImage($slug) 30 | { 31 | $track = Track::where('slug',$slug)->firstOrFail(); 32 | $image = storage_path('app/public/images/track/'.$track->image); 33 | return Image::make($image)->response(); 34 | } 35 | 36 | public function trackImageThumb($slug) 37 | { 38 | $track = Track::where('slug',$slug)->firstOrFail(); 39 | $image = storage_path('app/public/images/track/'.$track->image); 40 | return Image::make($image)->fit(350)->response(); 41 | } 42 | 43 | public function albumImage($slug) 44 | { 45 | $track = Album::where('slug',$slug)->firstOrFail(); 46 | $image = storage_path('app/public/images/album/'.$track->image); 47 | return Image::make($image)->response(); 48 | } 49 | 50 | public function albumImageThumb($slug) 51 | { 52 | $track = Album::where('slug',$slug)->firstOrFail(); 53 | $image = storage_path('app/public/images/album/'.$track->image); 54 | return Image::make($image)->fit(350)->response(); 55 | } 56 | 57 | public function mixtapeImage($slug) 58 | { 59 | $track = Mixtape::where('slug',$slug)->firstOrFail(); 60 | $image = storage_path('app/public/images/mixtape/'.$track->image); 61 | return Image::make($image)->response(); 62 | } 63 | 64 | public function mixtapeImageThumb($slug) 65 | { 66 | $track = Mixtape::where('slug',$slug)->firstOrFail(); 67 | $image = storage_path('app/public/images/mixtape/'.$track->image); 68 | return Image::make($image)->fit(350)->response(); 69 | } 70 | 71 | public function videoImage($slug) 72 | { 73 | $track = Video::where('slug',$slug)->firstOrFail(); 74 | $image = storage_path('app/public/images/video/'.$track->image); 75 | return Image::make($image)->response(); 76 | } 77 | 78 | public function videoImageThumb($slug) 79 | { 80 | $track = Video::where('slug',$slug)->firstOrFail(); 81 | $image = storage_path('app/public/images/video/'.$track->image); 82 | return Image::make($image)->fit(320,180)->response(); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /public/assets/javascripts/jquery.sticky.min.js: -------------------------------------------------------------------------------- 1 | !function(t){var e=Array.prototype.slice,r=Array.prototype.splice,i={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1},n=t(window),s=t(document),o=[],a=n.height(),c=function(){for(var e=n.scrollTop(),r=s.height(),i=r-a,c=e>i?i-e:0,p=0;p=e)null!==l.currentTop&&(l.stickyElement.css({width:"",position:"",top:""}),l.stickyElement.parent().removeClass(l.className),l.stickyElement.trigger("sticky-end",[l]),l.currentTop=null);else{var h=r-l.stickyElement.outerHeight()-l.topSpacing-l.bottomSpacing-e-c;if(0>h?h+=l.topSpacing:h=l.topSpacing,l.currentTop!=h){var g;l.getWidthFrom?g=t(l.getWidthFrom).width()||null:l.widthFromWrapper&&(g=l.stickyWrapper.width()),null==g&&(g=l.stickyElement.width()),l.stickyElement.css("width",g).css("position","fixed").css("top",h),l.stickyElement.parent().addClass(l.className),null===l.currentTop?l.stickyElement.trigger("sticky-start",[l]):l.stickyElement.trigger("sticky-update",[l]),l.currentTop===l.topSpacing&&l.currentTop>h||null===l.currentTop&&h").attr("id",a).addClass(r.wrapperClassName);e.wrapAll(c);var p=e.parent();r.center&&p.css({width:e.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==e.css("float")&&e.css({"float":"none"}).parent().css({"float":"right"}),p.css("height",s),r.stickyElement=e,r.stickyWrapper=p,r.currentTop=null,o.push(r)})},update:c,unstick:function(){return this.each(function(){for(var e=this,i=t(e),n=-1,s=o.length;s-->0;)o[s].stickyElement.get(0)===e&&(r.call(o,s,1),n=s);-1!=n&&(i.unwrap(),i.css({width:"",position:"",top:"","float":""}))})}};window.addEventListener?(window.addEventListener("scroll",c,!1),window.addEventListener("resize",p,!1)):window.attachEvent&&(window.attachEvent("onscroll",c),window.attachEvent("onresize",p)),t.fn.sticky=function(r){return l[r]?l[r].apply(this,e.call(arguments,1)):"object"!=typeof r&&r?void t.error("Method "+r+" does not exist on jQuery.sticky"):l.init.apply(this,arguments)},t.fn.unstick=function(r){return l[r]?l[r].apply(this,e.call(arguments,1)):"object"!=typeof r&&r?void t.error("Method "+r+" does not exist on jQuery.sticky"):l.unstick.apply(this,arguments)},t(function(){setTimeout(c,0)})}(jQuery); -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | 13 | 14 | 66 | 67 | 68 |
    69 | @if (Route::has('login')) 70 | 78 | @endif 79 | 80 |
    81 |
    82 | Laravel 83 |
    84 | 85 | 92 |
    93 |
    94 | 95 | 96 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('index'); 15 | 16 | Route::prefix('tracks')->group(function () { 17 | Route::get('image/{slug}.jpg', 'ImageController@trackImage')->name('track-image'); 18 | Route::get('image/thumb/{slug}.jpg', 'ImageController@trackImageThumb')->name('track-image-thumb'); 19 | 20 | Route::get('/', 'TracksController@browse')->name('browse-tracks'); 21 | Route::get('{slug}', 'TracksController@view')->name('view-track'); 22 | }); 23 | 24 | Route::prefix('albums')->group(function () { 25 | Route::get('image/{slug}.jpg', 'ImageController@albumImage')->name('album-image'); 26 | Route::get('image/thumb/{slug}.jpg', 'ImageController@albumImageThumb')->name('album-image-thumb'); 27 | 28 | Route::get('/', 'AlbumsController@browse')->name('browse-albums'); 29 | Route::get('{slug}', 'AlbumsController@view')->name('view-album'); 30 | Route::get('{slug1}/{slug2}-{slug3}', 'AlbumsController@viewTrack')->name('view-album-track'); 31 | }); 32 | 33 | Route::prefix('mixtapes')->group(function () { 34 | Route::get('image/{slug}.jpg', 'ImageController@mixtapeImage')->name('mixtape-image'); 35 | Route::get('image/thumb/{slug}.jpg', 'ImageController@mixtapeImageThumb')->name('mixtape-image-thumb'); 36 | 37 | Route::get('/', 'MixtapesController@browse')->name('browse-mixtapes'); 38 | Route::get('{slug}', 'MixtapesController@view')->name('view-mixtape'); 39 | Route::get('{slug1}/{slug2}-{slug3}', 'MixtapesController@viewTrack')->name('view-mixtape-track'); 40 | }); 41 | 42 | Route::prefix('videos')->group(function () { 43 | Route::get('image/{slug}.jpg', 'ImageController@videoImage')->name('video-image'); 44 | Route::get('image/thumb/{slug}.jpg', 'ImageController@videoImageThumb')->name('video-image-thumb'); 45 | 46 | Route::get('/', 'VideosController@browse')->name('browse-videos'); 47 | Route::get('{slug}', 'VideosController@view')->name('view-video'); 48 | }); 49 | 50 | Route::prefix('search')->group(function() { 51 | Route::get('/', 'SearchController@index')->name('search'); 52 | Route::get('tracks', 'SearchController@tracks')->name('search-tracks'); 53 | Route::get('albums', 'SearchController@albums')->name('search-albums'); 54 | Route::get('mixtapes', 'SearchController@mixtapes')->name('search-mixtapes'); 55 | Route::get('videos', 'SearchController@videos')->name('search-videos'); 56 | }); 57 | 58 | Route::prefix('scrape')->group(function () { 59 | Route::get('tracks', 'ScrapeController@scrapeTracks'); 60 | Route::get('albums', 'ScrapeController@scrapeAlbums'); 61 | Route::get('mixtapes', 'ScrapeController@scrapeMixtapes'); 62 | Route::get('videos', 'ScrapeController@scrapeVideos'); 63 | }); 64 | 65 | Route::get('{slug}','PagesController@view'); 66 | -------------------------------------------------------------------------------- /public/vendor/sitemap/styles/mobile.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | XML Sitemap (for Feature Phones) 8 | 9 | 10 | 18 | 98 | 99 | 100 |
    101 |

    XML Sitemap (for Feature Phones)

    102 |

    Generated by laravel-sitemap. This is styled xml sitemap (for feature phones).

    103 |

    This sitemap contains URLs.

    104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 |
    URL
    118 |
    119 |
    120 | 121 | 122 |
    123 |
    -------------------------------------------------------------------------------- /public/vendor/sitemap/styles/sitemapindex.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | XML Sitemap Index 8 | 9 | 10 | 18 | 98 | 99 | 100 |
    101 |

    XML Sitemap Index

    102 |

    Generated by laravel-sitemap. This is styled xml sitemapindex, sorted by update date.

    103 |

    This sitemap contains URLs.

    104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
    URLUpdated at
    120 |
    121 |
    122 | 123 | 124 |
    125 |
    -------------------------------------------------------------------------------- /resources/views/install/import.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | LeakedEarly Clone Install 8 | 9 | 10 | 14 | 15 | 16 |
    17 |
    18 |
    19 |

    Automated Music Site

    20 |

    Installation Wizard

    21 |

    Wait for all imports to complete and then hit the continue button below.

    22 |
    23 |
    24 |
    25 |
    26 |
    27 |
    28 |
    29 |

    Tracks Import Progress

    30 |
    31 | 32 |
    33 |
    34 |
    35 |

    Videos Import Progress

    36 |
    37 | 38 |
    39 |
    40 |
    41 |

    Albums Import Progress

    42 |
    43 | 44 |
    45 |
    46 |
    47 |

    Mixtapes Import Progress

    48 |
    49 | 50 |
    51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 |
    58 | {{ csrf_field() }} 59 | 60 |
    61 |
    62 |
    63 |
    64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /resources/views/search/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Searching for ' . Request::input('q') . ' | ' . env('APP_NAME') ) 4 | 5 | @section('content') 6 |
    7 |
    8 | 21 |
    22 |
    23 |

    Albums results

    24 | 25 | All 26 | 27 |
    28 |
      29 | @foreach($albums AS $album) 30 | @include('albums.block') 31 | @endforeach 32 |
    33 |
    34 |
    35 |
    36 |

    Mixtapes results

    37 | 38 | All 39 | 40 |
    41 |
      42 | @foreach($mixtapes AS $mixtape) 43 | @include('mixtapes.block') 44 | @endforeach 45 |
    46 |
    47 |
    48 |
    49 |

    Videos results

    50 | 51 | All 52 | 53 |
    54 |
      55 | @foreach($videos AS $video) 56 | @include('videos.block') 57 | @endforeach 58 |
    59 |
    60 |
    61 | 64 |
    65 | @endsection 66 | -------------------------------------------------------------------------------- /public/vendor/sitemap/styles/xml.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | XML Sitemap 8 | 9 | 10 | 18 | 96 | 97 | 98 |
    99 |

    XML Sitemap

    100 |

    Generated by laravel-sitemap. This is styled xml sitemap, sorted by update date.

    101 |

    This sitemap contains URLs.

    102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
    URLAlternatesImagesVideosPriorityUpdate freqUpdated at
    128 |
    129 |
    130 | 131 | 132 |
    133 |
    -------------------------------------------------------------------------------- /public/vendor/sitemap/styles/google-news.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | XML Sitemap (for Google News) 8 | 9 | 10 | 18 | 96 | 97 | 98 |
    99 |

    XML Sitemap (for Google News)

    100 |

    Generated by laravel-sitemap. This is styled version xml sitemap (for Google News), sorted by update date.

    101 |

    This sitemap contains URLs.

    102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
    URLTitlePublisherLanguageGenresAccessUpdated at
    128 |
    129 |
    130 | 131 | 132 |
    133 |
    -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /app/Http/Controllers/SearchController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 24 | } 25 | 26 | /** 27 | * Show the application dashboard. 28 | * 29 | * @return \Illuminate\Http\Response 30 | */ 31 | public function index(Request $request) 32 | { 33 | $where = [['status','=','enabled'],['artist','LIKE','%'.$request->q.'%']]; 34 | $orWhere = [['status','=','enabled'],['name','LIKE','%'.$request->q.'%']]; 35 | if( $request->has('genre') ) 36 | { 37 | $tag = Genre::where('slug',$request->genre)->first(); 38 | if( $tag ) 39 | { 40 | $where[] = ['genre_id','=',$tag->id]; 41 | $orWhere[] = ['genre_id','=',$tag->id]; 42 | } 43 | } 44 | $tracks = Track::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->limit(10)->get(); 45 | $albums = Album::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->limit(3)->get(); 46 | $mixtapes = Mixtape::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->limit(3)->get(); 47 | $videos = Video::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->limit(3)->get(); 48 | return view('search.index', ['tracks'=>$tracks,'albums'=>$albums,'mixtapes'=>$mixtapes,'videos'=>$videos]); 49 | } 50 | 51 | public function tracks(Request $request) 52 | { 53 | $where = [['status','=','enabled'],['artist','LIKE','%'.$request->q.'%']]; 54 | $orWhere = [['status','=','enabled'],['name','LIKE','%'.$request->q.'%']]; 55 | if( $request->has('genre') ) 56 | { 57 | $tag = Genre::where('slug',$request->genre)->first(); 58 | if( $tag ) 59 | { 60 | $where[] = ['genre_id','=',$tag->id]; 61 | $orWhere[] = ['genre_id','=',$tag->id]; 62 | } 63 | } 64 | $tracks = Track::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->paginate(20); 65 | return view('search.tracks', ['tracks'=>$tracks]); 66 | } 67 | 68 | public function albums(Request $request) 69 | { 70 | $where = [['status','=','enabled'],['artist','LIKE','%'.$request->q.'%']]; 71 | $orWhere = [['status','=','enabled'],['name','LIKE','%'.$request->q.'%']]; 72 | if( $request->has('genre') ) 73 | { 74 | $tag = Genre::where('slug',$request->genre)->first(); 75 | if( $tag ) 76 | { 77 | $where[] = ['genre_id','=',$tag->id]; 78 | $orWhere[] = ['genre_id','=',$tag->id]; 79 | } 80 | } 81 | $albums = Album::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->paginate(20); 82 | return view('search.albums', ['albums'=>$albums]); 83 | } 84 | 85 | public function mixtapes(Request $request) 86 | { 87 | $where = [['status','=','enabled'],['artist','LIKE','%'.$request->q.'%']]; 88 | $orWhere = [['status','=','enabled'],['name','LIKE','%'.$request->q.'%']]; 89 | if( $request->has('genre') ) 90 | { 91 | $tag = Genre::where('slug',$request->genre)->first(); 92 | if( $tag ) 93 | { 94 | $where[] = ['genre_id','=',$tag->id]; 95 | $orWhere[] = ['genre_id','=',$tag->id]; 96 | } 97 | } 98 | $mixtapes = Mixtape::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->paginate(20); 99 | return view('search.mixtapes', ['mixtapes'=>$mixtapes]); 100 | } 101 | 102 | public function videos(Request $request) 103 | { 104 | $where = [['status','=','enabled'],['artist','LIKE','%'.$request->q.'%']]; 105 | $orWhere = [['status','=','enabled'],['name','LIKE','%'.$request->q.'%']]; 106 | if( $request->has('genre') ) 107 | { 108 | $tag = Genre::where('slug',$request->genre)->first(); 109 | if( $tag ) 110 | { 111 | $where[] = ['genre_id','=',$tag->id]; 112 | $orWhere[] = ['genre_id','=',$tag->id]; 113 | } 114 | } 115 | $videos = Video::where($where)->orWhere($orWhere)->orderBy('created_at','desc')->paginate(20); 116 | return view('search.videos', ['videos'=>$videos]); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /resources/views/vendor/sitemap/xml.php: -------------------------------------------------------------------------------- 1 | '."\n" ?> 2 | '."\n"; ?> 3 | 4 | 5 | 6 | 7 | ' . "\n"; 12 | } 13 | } 14 | 15 | if (!empty($item['alternates'])) { 16 | foreach ($item['alternates'] as $alternate) { 17 | echo "\t\t" . '' . "\n"; 18 | } 19 | } 20 | 21 | if ($item['priority'] !== null) { 22 | echo "\t\t" . '' . $item['priority'] . '' . "\n"; 23 | } 24 | 25 | if ($item['lastmod'] !== null) { 26 | echo "\t\t" . '' . date('Y-m-d\TH:i:sP', strtotime($item['lastmod'])) . '' . "\n"; 27 | } 28 | 29 | if ($item['freq'] !== null) { 30 | echo "\t\t" . '' . $item['freq'] . '' . "\n"; 31 | } 32 | 33 | if (!empty($item['images'])) { 34 | foreach($item['images'] as $image) { 35 | echo "\t\t" . '' . "\n"; 36 | echo "\t\t\t" . '' . $image['url'] . '' . "\n"; 37 | if (isset($image['title'])) echo "\t\t\t" . '' . $image['title'] . '' . "\n"; 38 | if (isset($image['caption'])) echo "\t\t\t" . '' . $image['caption'] . '' . "\n"; 39 | if (isset($image['geo_location'])) echo "\t\t\t" . '' . $image['geo_location'] . '' . "\n"; 40 | if (isset($image['license'])) echo "\t\t\t" . '' . $image['license'] . '' . "\n"; 41 | echo "\t\t" . '' . "\n"; 42 | } 43 | } 44 | 45 | if (!empty($item['videos'])) { 46 | foreach($item['videos'] as $video) { 47 | echo "\t\t" . '' . "\n"; 48 | if (isset($video['thumbnail_loc'])) echo "\t\t\t" . '' . $video['thumbnail_loc'] . '' . "\n"; 49 | if (isset($video['title'])) echo "\t\t\t" . '' . "\n"; 50 | if (isset($video['description'])) echo "\t\t\t" . '' . "\n"; 51 | if (isset($video['content_loc'])) echo "\t\t\t" . '' . $video['content_loc'] . '' . "\n"; 52 | if (isset($video['duration'])) echo "\t\t\t" . '' . $video['duration'] . '' . "\n"; 53 | if (isset($video['expiration_date'])) echo "\t\t\t" . '' . $video['expiration_date'] . '' . "\n"; 54 | if (isset($video['rating'])) echo "\t\t\t" . '' . $video['rating'] . '' . "\n"; 55 | if (isset($video['view_count'])) echo "\t\t\t" . '' . $video['view_count'] . '' . "\n"; 56 | if (isset($video['publication_date'])) echo "\t\t\t" . '' . $video['publication_date'] . '' . "\n"; 57 | if (isset($video['family_friendly'])) echo "\t\t\t" . '' . $video['family_friendly'] . '' . "\n"; 58 | if (isset($video['requires_subscription'])) echo "\t\t\t" . '' . $video['requires_subscription'] . '' . "\n"; 59 | if (isset($video['live'])) echo "\t\t\t" . '' . $video['live'] . '' . "\n"; 60 | if (isset($video['player_loc'])) echo "\t\t\t" . '' . $video['player_loc']['player_loc'] . '' . "\n"; 62 | if (isset($video['restriction'])) echo "\t\t\t" . '' . $video['restriction']['restriction'] . '' . "\n"; 63 | if (isset($video['gallery_loc'])) echo "\t\t\t" . '' . $video['gallery_loc']['gallery_loc'] . '' . "\n"; 64 | if (isset($video['price'])) echo "\t\t\t" . '' . $video['price']['price'] . '' . "\n"; 65 | if (isset($video['uploader'])) echo "\t\t\t" . '' . $video['uploader']['uploader'] . '' . "\n"; 66 | echo "\t\t" . '' . "\n"; 67 | } 68 | } 69 | 70 | ?> 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /resources/views/videos/view.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $video->artist . ' - ' . $video->name . ' Video Stream | ' . env('APP_NAME') ) 4 | @section('og_title', 'Watch ' . $video->artist . ' video ' . $video->name . ' on ' . env('APP_NAME') ) 5 | @section('description', 'Stream ' . $video->artist . ' video ' . $video->name . ' from ' . env('APP_NAME') ) 6 | @section('keywords', $video->keywords) 7 | @section('og_url',url('videos/'.$video->slug)) 8 | @section('og_image',url('videos/image/'.$video->slug.'.jpg')) 9 | @section('og_image_width', $image->width()) 10 | @section('og_image_height', $image->height()) 11 | 12 | @push('scripts') 13 |
    14 | 30 | 31 | 34 | @endpush 35 | 36 | @push('head_ads') 37 | @include('blocks.popads') 38 | @endpush 39 | 40 | @section('content') 41 |
    42 |
    43 |
    44 | 74 | 79 |
    80 |
    81 | 82 |
    83 |
    84 |
    85 | @include('widgets.comments.widget', ['url'=>url('videos/'.$video->slug)]) 86 |
    87 | 90 |
    91 | @endsection 92 | -------------------------------------------------------------------------------- /resources/views/albums/track.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $album->artist . ' - ' . $track['name'] . ' MP3 Download | ' . env('APP_NAME') ) 4 | @section('og_title', 'Listen to ' . $album->artist . ' album ' . $track['name'] . ' on ' . env('APP_NAME') ) 5 | @section('description', 'Stream & Download ' . $album->artist . ' - ' . $track['name'] . ' from ' . env('APP_NAME') ) 6 | @section('keywords', $album->keywords) 7 | @section('og_url',url('albums/'.$album->slug.'/'.$track_id.'-'.str_slug($track['name']) )) 8 | @section('og_image',url('albums/image/'.$album->slug.'.jpg')) 9 | @section('og_image_width', $image->width()) 10 | @section('og_image_height', $image->height()) 11 | 12 | @push('scripts') 13 |
    14 | 30 | 31 | 34 | @endpush 35 | 36 | @push('head_ads') 37 | @include('blocks.popads') 38 | @endpush 39 | 40 | @section('content') 41 |
    42 |
    43 |
    44 | 78 | 83 |
    84 | 85 |
    86 |
    87 | 88 | @include('widgets.comments.widget',['url'=>url('albums/'.$album->slug.'/'.$track_id.'-'.str_slug($track['name']) )]) 89 |
    90 | 93 |
    94 | @endsection 95 | -------------------------------------------------------------------------------- /resources/views/mixtapes/track.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $mixtape->artist . ' - ' . $track['name'] . ' MP3 Download | ' . env('APP_NAME') ) 4 | @section('og_title', 'Listen to ' . $mixtape->artist . ' mixtape ' . $track['name'] . ' on ' . env('APP_NAME') ) 5 | @section('description', 'Stream & Download ' . $mixtape->artist . ' - ' . $track['name'] . ' from ' . env('APP_NAME') ) 6 | @section('keywords', $mixtape->keywords) 7 | @section('og_url',url('mixtapes/'.$mixtape->slug.'/'.$track_id.'-'.str_slug($track['name']) )) 8 | @section('og_image',url('mixtapes/image/'.$mixtape->slug.'.jpg')) 9 | @section('og_image_width', $image->width()) 10 | @section('og_image_height', $image->height()) 11 | 12 | @push('scripts') 13 |
    14 | 30 | 31 | 34 | @endpush 35 | 36 | @push('head_ads') 37 | @include('blocks.popads') 38 | @endpush 39 | 40 | @section('content') 41 |
    42 |
    43 |
    44 | 78 | 83 |
    84 | 85 |
    86 |
    87 | 88 | @include('widgets.comments.widget',['url'=>url('mixtapes/'.$mixtape->slug.'/'.$track_id.'-'.str_slug($track['name']) )]) 89 |
    90 | 93 |
    94 | @endsection 95 | -------------------------------------------------------------------------------- /resources/views/tracks/view.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $track->artist . ' - ' . $track->name . ' Mp3 Download | ' . env('APP_NAME') ) 4 | @section('og_title', 'Listen to ' . $track->artist . ' - ' . $track->name . ' on ' . env('APP_NAME') ) 5 | @section('description', 'Stream & Download ' . $track->artist . ' - ' . $track->name . ' from ' . env('APP_NAME') ) 6 | @section('keywords', $track->keywords) 7 | @section('og_url',url('tracks/'.$track->slug)) 8 | @section('og_image',url('tracks/image/'.$track->slug.'.jpg')) 9 | @section('og_image_width', $image->width()) 10 | @section('og_image_height', $image->height()) 11 | 12 | @push('scripts') 13 |
    14 | 30 | 31 | 34 | @endpush 35 | 36 | @push('head_ads') 37 | @include('blocks.popads') 38 | @endpush 39 | 40 | @section('content') 41 |
    42 |
    43 |
    44 | 78 | 83 |
    84 | 85 |
    86 |
    87 | @include('widgets.related.widget', ['genre_id'=>$track->genre_id,'type'=>'tracks']) 88 | @include('widgets.comments.widget', ['url'=>url('tracks/'.$track->slug)]) 89 |
    90 | 93 |
    94 | @endsection 95 | -------------------------------------------------------------------------------- /resources/views/albums/view.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $album->artist . ' - ' . $album->name . ' Album Zip Download | ' . env('APP_NAME') ) 4 | @section('og_title', 'Listen to ' . $album->artist . ' album ' . $album->name . ' on ' . env('APP_NAME') ) 5 | @section('description', 'Stream & Download ' . $album->artist . ' - ' . $album->name . ' from ' . env('APP_NAME') ) 6 | @section('keywords', $album->keywords) 7 | @section('og_url',url('albums/'.$album->slug)) 8 | @section('og_image',url('albums/image/'.$album->slug.'.jpg')) 9 | @section('og_image_width', $image->width()) 10 | @section('og_image_height', $image->height()) 11 | 12 | @push('scripts') 13 |
    14 | 30 | 31 | 34 | @endpush 35 | 36 | @push('head_ads') 37 | @include('blocks.popads') 38 | @endpush 39 | 40 | @section('content') 41 |
    42 |
    43 |
    44 | 76 | 81 |
    82 |
    83 |
      84 | 85 | @foreach( json_decode( $album->tracks ) AS $track ) 86 | @include('albums.blocks.track') 87 | 88 | @endforeach 89 |
    90 |
    91 |
    92 | @include('widgets.comments.widget',['url'=>url('albums/'.$album->slug)]) 93 |
    94 | 97 |
    98 | @endsection 99 | --------------------------------------------------------------------------------