欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

造个轮子:基于 Laravel 的下一代 PHP 开发框架(API+SPA 单页应用 )

这是我们团队的一个非盈利项目,以Apache2.0协议开源…不限制商用

Notadd是什么

Notadd 是基于Laravel 和 Vue 的开源PHP框架, 由于其本身的灵活性和先进的技术架构,使得你通过模块(主功能)、插件(功能增强)、模板(前端样式)像搭积木一样组合成你想要的,诸如:商城、CMS、微信、论坛… 快速完成开发。
Notadd 像操作系统一样,你可以通过安装“软件”,成为适用于你的“电脑”。

先进的技术方案,使得你无需担心后期功能拓展与迭代问题,大大降低了维护成本。对于一个超过三年生命周期的项目来说,Notadd 最适合不过。

总之,Notadd 是新的技术方向标,能让每个web艺术家像构建工程一样构建程序。

相关技术

  • PHP7
  • Laravel
  • VueJS单页面web应用
  • Composer

功能特性

  • 前后端完全分离
  • 前端渲染模板,大大降低后端负载
  • 页面无刷新,响应速度快
  • 低耦合度,可“搭积木”
  • 同时支持所有平台(PC/平板/手机/APP/硬件)

文档

https://docs.notadd.com/

项目地址

github项目地址
oschina项目地址

开源这条路真的很艰难,希望大家能给个星吧~~

 

快速开始

开始前,请确保gitphpcomposer 可用。

1)下载或克隆仓库:

git clone https://github.com/notadd/notadd.git

2)部署代码,修改 public、storage 目录权限:

Linux:

chown -R www-data:www-data notadd

参见执行 php 的用户名及用户组 or

chmod 755 notadd/public notadd/storage

Windows请跳过此步。

3)执行 安装;

cd notadd
composer install
php notadd vendor:publish --force

4)绑定域名到 notadd/public 目录

5)访问后台入口 http://yourdomain/admin

声明:本文转载自Laravel学堂:http://forum.laravelacademy.org/d/268-laravel-php-api-spa

学院君 has written 697 articles

资深PHP工程师,Laravel学院院长

 
 

24 thoughts on “造个轮子:基于 Laravel 的下一代 PHP 开发框架(API+SPA 单页应用 )

  1. hongwei says:
     

    (1/1) ErrorException
    You must set the encryption key going forward to improve the security of this library - see this page for more information https://oauth2.thephpleague.com/v5-security-improvements/

      1. vikey says:
         

        体验不是很好之后就没怎么看了~
        是这样的,public 的确是网站根目录
        当我用邮箱登录的时候返回如下信息
        {
        “code”: 403,
        “message”: “登录失败!”
        }
        当我用账号登录的时候返回如下信息
        {
        “code”: 404,
        “message”: “Client error: `POST http://notadd.ol.ttigame.cn/oauth/access` resulted in a `404 Not Found` response:\n\r\n404 Not Found\r\n\r\n404 Not Found\r\n (truncated…)\n”,
        “trace”: “#0 /home/vagrant/Code/notadd/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\\Exception\\RequestException::create(Object(GuzzleHttp\\Psr7\\Request), Object(GuzzleHttp\\Psr7\\Response))\n#1 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Response))\n#2 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\\Promise\\Promise::callHandler(1, Object(GuzzleHttp\\Psr7\\Response), Array)\n#3 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\\Promise\\Promise::GuzzleHttp\\Promise\\{closure}()\n#4 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\\Promise\\TaskQueue->run(true)\n#5 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\\Promise\\Promise->invokeWaitFn()\n#6 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#7 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\\Promise\\Promise->invokeWaitList()\n#8 /home/vagrant/Code/notadd/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#9 /home/vagrant/Code/notadd/vendor/guzzlehttp/guzzle/src/Client.php(129): GuzzleHttp\\Promise\\Promise->wait()\n#10 /home/vagrant/Code/notadd/vendor/guzzlehttp/guzzle/src/Client.php(87): GuzzleHttp\\Client->request(‘post’, ‘http://notadd.o…’, Array)\n#11 /home/vagrant/Code/notadd/modules/administration/src/Controllers/AdminController.php(159): GuzzleHttp\\Client->__call(‘post’, Array)\n#12 [internal function]: Notadd\\Administration\\Controllers\\AdminController->token(Object(Notadd\\Foundation\\Passport\\Responses\\ApiResponse))\n#13 /home/vagrant/Code/notadd/vendor/illuminate/routing/Controller.php(55): call_user_func_array(Array, Array)\n#14 /home/vagrant/Code/notadd/vendor/illuminate/routing/ControllerDispatcher.php(44): Illuminate\\Routing\\Controller->callAction(‘token’, Array)\n#15 /home/vagrant/Code/notadd/vendor/illuminate/routing/Route.php(203): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Notadd\\Administration\\Controllers\\AdminController), ‘token’)\n#16 /home/vagrant/Code/notadd/vendor/illuminate/routing/Route.php(160): Illuminate\\Routing\\Route->runController()\n#17 /home/vagrant/Code/notadd/vendor/illuminate/routing/Router.php(559): Illuminate\\Routing\\Route->run()\n#18 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#19 /home/vagrant/Code/notadd/vendor/illuminate/routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#20 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#21 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#22 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Middlewares/VerifyCsrfToken.php(72): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#23 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Notadd\\Foundation\\Http\\Middlewares\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#24 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#25 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Middlewares/ShareMessagesFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Notadd\\Foundation\\Http\\Middlewares\\ShareMessagesFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#28 /home/vagrant/Code/notadd/vendor/illuminate/view/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#29 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#30 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#31 /home/vagrant/Code/notadd/vendor/illuminate/session/Middleware/StartSession.php(64): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#32 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#33 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#34 /home/vagrant/Code/notadd/vendor/illuminate/cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#35 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#36 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#37 /home/vagrant/Code/notadd/vendor/illuminate/cookie/Middleware/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#38 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#39 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#40 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Middlewares/CheckForCloseMode.php(69): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#41 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Notadd\\Foundation\\Http\\Middlewares\\CheckForCloseMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#42 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#43 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Middlewares/EnableCrossRequest.php(52): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Notadd\\Foundation\\Http\\Middlewares\\EnableCrossRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#45 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#46 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#47 /home/vagrant/Code/notadd/vendor/illuminate/routing/Router.php(561): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#48 /home/vagrant/Code/notadd/vendor/illuminate/routing/Router.php(520): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#49 /home/vagrant/Code/notadd/vendor/illuminate/routing/Router.php(498): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))\n#50 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Kernel.php(306): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))\n#51 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(30): Notadd\\Foundation\\Http\\Kernel->Notadd\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#52 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Middlewares/CheckForMaintenanceMode.php(51): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#53 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(148): Notadd\\Foundation\\Http\\Middlewares\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))\n#54 /home/vagrant/Code/notadd/vendor/illuminate/routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#55 /home/vagrant/Code/notadd/vendor/illuminate/pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#56 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Kernel.php(189): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#57 /home/vagrant/Code/notadd/vendor/notadd/framework/src/Http/Kernel.php(159): Notadd\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#58 /home/vagrant/Code/notadd/public/index.php(12): Notadd\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))\n#59 {main}”
        }


普通分类: