Skip to content

Commit

Permalink
Use package bestmomo/filemanager for filemanager
Browse files Browse the repository at this point in the history
  • Loading branch information
bestmomo committed Aug 26, 2015
1 parent 2c2fc38 commit 75531dd
Show file tree
Hide file tree
Showing 1,085 changed files with 29 additions and 224,361 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* `composer install`
* `php artisan key:generate`
* Create a database and inform *.env*
* `php artisan migrate` to create tables
* `php artisan db:seed` to populate tables
* `php artisan migrate --seed` to create and populate tables
* Inform *config/mail.php* for email sends
* `php artisan vendor:publish` to publish filemanager

### Include ###

Expand Down
20 changes: 20 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,24 @@ public function isNotUser()
return $this->role->slug != 'user';
}

/**
* Check media all access
*
* @return bool
*/
public function accessMediasAll()
{
return $this->isAdmin();
}

/**
* Check media access one folder
*
* @return bool
*/
public function accessMediasFolder()
{
return $this->isNotUser();
}

}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"laravelcollective/html": "5.1.*"
"laravelcollective/html": "5.1.*",
"bestmomo/filemanager": "1.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
Expand Down
1 change: 1 addition & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Services\Html\HtmlServiceProvider::class,
Bestmomo\Filemanager\FilemanagerServiceProvider::class,

],

Expand Down
8 changes: 4 additions & 4 deletions database/seeds/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function run()
Post::create([
'title' => 'Post 1',
'slug' => 'post-1',
'summary' => '<img alt="" src="/filemanager/userfiles/greatredactor/mega-champignon-icone-8453-128.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'summary' => '<img alt="" src="/filemanager/userfiles/user2/mega-champignon.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'content' => $lipsum->getContent(500),
'active' => true,
'user_id' => 1
Expand All @@ -115,7 +115,7 @@ public function run()
Post::create([
'title' => 'Post 2',
'slug' => 'post-2',
'summary' => '<img alt="" src="/filemanager/userfiles/greatredactor/goomba-icone-7704-128.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'summary' => '<img alt="" src="/filemanager/userfiles/user2/goomba.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'content' => '<p>Lorem ipsum convallis ac curae non elit ultrices placerat netus metus feugiat, non conubia fusce porttitor sociosqu diam commodo metus in himenaeos, vitae aptent consequat luctus purus eleifend enim sollicitudin eleifend porta. Malesuada ac class conubia condimentum mauris facilisis conubia quis scelerisque lacinia, tempus nullam felis fusce ac potenti netus ornare semper. Molestie iaculis fermentum ornare curabitur tincidunt imperdiet scelerisque, imperdiet euismod scelerisque torquent curae rhoncus, sollicitudin tortor placerat aptent hac nec. Posuere suscipit sed tortor neque urna hendrerit vehicula duis litora tristique congue nec auctor felis libero, ornare habitasse nec elit felis inceptos tellus inceptos cubilia quis mattis faucibus sem non.</p>
<p>Odio fringilla class aliquam metus ipsum lorem luctus pharetra dictum, vehicula tempus in venenatis gravida ut gravida proin orci, quis sed platea mi quisque hendrerit semper hendrerit. Facilisis ante sapien faucibus ligula commodo vestibulum rutrum pretium, varius sem aliquet himenaeos dolor cursus nunc habitasse, aliquam ut curabitur ipsum luctus ut rutrum. Odio condimentum donec suscipit molestie est etiam sit rutrum dui nostra, sem aliquet conubia nullam sollicitudin rhoncus venenatis vivamus rhoncus netus, risus tortor non mauris turpis eget integer nibh dolor. Commodo venenatis ut molestie semper adipiscing amet cras, class donec sapien malesuada auctor sapien arcu inceptos, aenean consequat metus litora mattis vivamus.</p>
Expand Down Expand Up @@ -148,7 +148,7 @@ public function run()
Post::create([
'title' => 'Post 3',
'slug' => 'post-3',
'summary' => '<img alt="" src="/filemanager/userfiles/greatredactor/rouge-shell--icone-5599-128.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'summary' => '<img alt="" src="/filemanager/userfiles/user2/rouge-shell.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'content' => $lipsum->getContent(500),
'active' => true,
'user_id' => 2
Expand All @@ -157,7 +157,7 @@ public function run()
Post::create([
'title' => 'Post 4',
'slug' => 'post-4',
'summary' => '<img alt="" src="/filemanager/userfiles/greatredactor/rouge-shyguy-icone-6870-128.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'summary' => '<img alt="" src="/filemanager/userfiles/user2/rouge-shyguy.png" style="float:left; height:128px; width:128px" />' . $lipsum->getContent(50),
'content' => $lipsum->getContent(500),
'active' => true,
'user_id' => 2
Expand Down
1 change: 0 additions & 1 deletion public/filemanager/.gitignore

This file was deleted.

Loading

0 comments on commit 75531dd

Please sign in to comment.