Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
laravel-blog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
康顺
laravel-blog
Commits
8df5363e
Commit
8df5363e
authored
Nov 01, 2018
by
康顺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
包
parent
49fee7ee
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
182 additions
and
0 deletions
+182
-0
.gitignore
app/Admin/Extensions/laravel-admin-ext/blog/.gitignore
+8
-0
LICENSE
app/Admin/Extensions/laravel-admin-ext/blog/LICENSE
+20
-0
README.md
app/Admin/Extensions/laravel-admin-ext/blog/README.md
+4
-0
composer.json
app/Admin/Extensions/laravel-admin-ext/blog/composer.json
+34
-0
2018_11_01_101819_create_article_table.php
...ase/migrations/2018_11_01_101819_create_article_table.php
+35
-0
index.blade.php
...ns/laravel-admin-ext/blog/resources/views/index.blade.php
+2
-0
web.php
app/Admin/Extensions/laravel-admin-ext/blog/routes/web.php
+6
-0
Blog.php
app/Admin/Extensions/laravel-admin-ext/blog/src/Blog.php
+21
-0
BlogServiceProvider.php
...nsions/laravel-admin-ext/blog/src/BlogServiceProvider.php
+34
-0
BlogController.php
...el-admin-ext/blog/src/Http/Controllers/BlogController.php
+18
-0
No files found.
app/Admin/Extensions/laravel-admin-ext/blog/.gitignore
0 → 100644
View file @
8df5363e
.DS_Store
phpunit.phar
/vendor
composer.phar
composer.lock
*.project
.idea/
\ No newline at end of file
app/Admin/Extensions/laravel-admin-ext/blog/LICENSE
0 → 100644
View file @
8df5363e
The MIT License (MIT)
Copyright (c) 2015 Jens Segers
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
app/Admin/Extensions/laravel-admin-ext/blog/README.md
0 → 100644
View file @
8df5363e
laravel-admin extension
======
app/Admin/Extensions/laravel-admin-ext/blog/composer.json
0 → 100644
View file @
8df5363e
{
"name"
:
"laravel-admin-ext/blog"
,
"description"
:
"description..."
,
"type"
:
"library"
,
"keywords"
:
[
"laravel-admin"
,
"extension"
],
"homepage"
:
"https://github.com/laravel-admin-ext/blog"
,
"license"
:
"MIT"
,
"authors"
:
[
{
"name"
:
"your name"
,
"email"
:
"your email"
}
],
"require"
:
{
"php"
:
">=7.0.0"
,
"encore/laravel-admin"
:
"~1.6"
},
"require-dev"
:
{
"phpunit/phpunit"
:
"~6.0"
},
"autoload"
:
{
"psr-4"
:
{
"SMG
\\
Blog
\\
"
:
"src/"
}
},
"extra"
:
{
"laravel"
:
{
"providers"
:
[
"SMG
\\
Blog
\\
BlogServiceProvider"
]
}
}
}
app/Admin/Extensions/laravel-admin-ext/blog/database/migrations/2018_11_01_101819_create_article_table.php
0 → 100644
View file @
8df5363e
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateArticleTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'articles'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'title'
,
60
);
$table
->
string
(
'description'
,
60
);
$table
->
text
(
'content'
);
$table
->
integer
(
'user_id'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'articles'
);
}
}
app/Admin/Extensions/laravel-admin-ext/blog/resources/views/index.blade.php
0 → 100644
View file @
8df5363e
Welcome
to
laravel
-
admin
\ No newline at end of file
app/Admin/Extensions/laravel-admin-ext/blog/routes/web.php
0 → 100644
View file @
8df5363e
<?php
use
SMG\Blog\Http\Controllers\BlogController
;
Route
::
get
(
'blog'
,
BlogController
::
class
.
'@index'
);
\ No newline at end of file
app/Admin/Extensions/laravel-admin-ext/blog/src/Blog.php
0 → 100644
View file @
8df5363e
<?php
namespace
SMG\Blog
;
use
Encore\Admin\Extension
;
class
Blog
extends
Extension
{
public
$name
=
'blog'
;
public
$views
=
__DIR__
.
'/../resources/views'
;
public
$assets
=
__DIR__
.
'/../resources/assets'
;
public
$menu
=
[
'title'
=>
'Blog'
,
'path'
=>
'blog'
,
'icon'
=>
'fa-gears'
,
];
}
\ No newline at end of file
app/Admin/Extensions/laravel-admin-ext/blog/src/BlogServiceProvider.php
0 → 100644
View file @
8df5363e
<?php
namespace
SMG\Blog
;
use
Illuminate\Support\ServiceProvider
;
class
BlogServiceProvider
extends
ServiceProvider
{
/**
* {@inheritdoc}
*/
public
function
boot
(
Blog
$extension
)
{
if
(
!
Blog
::
boot
())
{
return
;
}
if
(
$views
=
$extension
->
views
())
{
$this
->
loadViewsFrom
(
$views
,
'blog'
);
}
if
(
$this
->
app
->
runningInConsole
()
&&
$assets
=
$extension
->
assets
())
{
$this
->
publishes
(
[
$assets
=>
public_path
(
'vendor/laravel-admin-ext/blog'
)],
'blog'
);
}
$this
->
app
->
booted
(
function
()
{
Blog
::
routes
(
__DIR__
.
'/../routes/web.php'
);
});
}
}
\ No newline at end of file
app/Admin/Extensions/laravel-admin-ext/blog/src/Http/Controllers/BlogController.php
0 → 100644
View file @
8df5363e
<?php
namespace
SMG\Blog\Http\Controllers
;
use
Encore\Admin\Layout\Content
;
use
Illuminate\Routing\Controller
;
class
BlogController
extends
Controller
{
public
function
index
(
Content
$content
)
{
return
$content
->
header
(
'Title'
)
->
description
(
'Description'
)
->
body
(
view
(
'blog::index'
));
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment