someline / someline-starter Goto Github PK
View Code? Open in Web Editor NEWSomeline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern PHP design pattern foundation.
Home Page: https://starter.someline.com/
Someline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern PHP design pattern foundation.
Home Page: https://starter.someline.com/
# php artisan make:entity Order
//modify Order extend BaseModel
class Order extends BaseModel implements Transformable
{
use TransformableTrait;
protected $fillable = ['title','price','note'];
}
public function store(OrderCreateRequest $request)
{
$data = $request->only(['title', 'price', 'note']);
$this->validator->with($data)->passesOrFail(ValidatorInterface::RULE_CREATE);
$oder = $this->repository->create($data); // Can get an Eloquent instance
return $order ; // 500 error, class Order extends Model is ok
}
// get all data return 500 ,no errors
public function index()
{
$this->repository->pushCriteria(app('Prettus\Repository\Criteria\RequestCriteria'));
return $this->repository->all();
}
Hi, i looked at this project and it is very nice.
it would be nice to implement a generator to do all the heavy work.
Thanks..
how to use datatable in someline and paginate demo?
Hi,
i have this error while running the command php artisan route:list
:
[ReflectionException]
Class Someline\Http\Controllers\HomeController does not exist
Solution :
Another issue : I dont see Api routes in the result of that command, why ?
Thanks
php artisan app:namespace YourApp is undefined,
it should be:
php artisan app:name YourApp
Hi,
I'm getting this error when I run migrate.
While installing on mysql 5.5.42
encoding utf8mb4 collation utf8mb4_unicode_ci
Migration table created successfully.
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `oauth_client_endpoints` add unique `oauth_cli
ent_endpoints_client_id_redirect_uri_unique`(`client_id`, `redirect_uri`))
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Quoting the readme
:
Note: You may notice that .idea folder is included. No worries, any conflict files in .idea folder has been ignored as in .gitignore file.
My question is: Why is it included?
Anyway, thank you for this package.
Side note: hey, I just noticed it uses Laravel Log Viewer (author here). Thank you to use it!
Newbie to laravel,
Followed the instructions, but when I deployed the site, no CSS is being pulled.
Getting 404 errors
http://someline.app/assets/css/app.main.css
(index):12 GET http://someline.app/assets/css/app.vendor.css
(index):11 GET http://someline.app/assets/css/app.theme.css
(index):365 GET http://someline.app/assets/js/manifest.js
(index):364 GET http://someline.app/assets/js/app.vendor.js
(index):363 GET http://someline.app/assets/js/app.theme.js
(index):366 GET http://someline.app/assets/js/vendor.js
(index):367 GET http://someline.app/assets/js/app.main.js
(index):364 GET http://someline.app/assets/js/app.vendor.js
(index):365 GET http://someline.app/assets/js/manifest.js
(index):366 GET http://someline.app/assets/js/vendor.js
(index):367 GET http://someline.app/assets/js/app.main.js 404 (Not Found)
I have tried following the steps but no dice.
I did tried to setup the version 0.3.4 of Someline Starter but when i run Unit test i get the follow error:
Response STATUS CODE is 401:
Array
(
[error] => invalid_client
[message] => Client authentication failed
)
Failed to get access token for grant type [password]!
I run all the commands, the oauth_* tables are populated but i get the error Failed to get access token
...
I'm trying to run the pre-built test of Users. Too difficult at the moment write other tests... :)
用里面的模板,api 请求都返回message":"Unauthenticated.","status_code":401,"debug": 是什么原因?
HI:
when I run
php artisan migrate
I get the flowing error
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodena
me nor servname provided, or not known (SQL: select * from information_sche
ma.tables where table_schema = someline_starter and table_name = migra
tions)
some plugins in composer.json not find,so composer update can not install theses plugins.
npm run watch 命令监控不了文件变化
I can see this error in my firefox console:
"Error: [vuex] must call Vue.use(Vuex) before creating a store instance."
when i try to use Vue
I want to change the timezone, I have changed the timezone in config/app.php
to 'timezone' => 'PRC'
.
And when I check the database, I found the field I added myself showed the correct time, however the default field added by the Framework itself created _at
, updated_at
showed the UTC time.
I want to know whether exits a place to change the framework timezone?
Thx!
Can you suggest any role-based permission package compatible with Someline starter? I have tried spatie/laravel-permission; however, its not working.
the starter project use Someline as the default namespace. which is same as the starter framework.
then we cannot change namespace correctly with command 'artisan app:name'
Hi,
Thanks for this greate framework.
i'm watching your tutorial on Youtube. But when i want to migrate the database using the command php artisan migrate --seed
i had this error message : [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oauth_client_endpoints' already exists (SQL: cr eate table
oauth_client_endpoints(
idint unsigned not null auto_increment primary key,
client_idvarchar (40) not null,
redirect_urivarchar(255) not null,
created_attimestamp null,
updated_at` timestamp null)
default character set utf8mb4 collate utf8mb4_unicode_ci)
[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oauth_client_endpoints' already exists`
I have on my Homestead box "MariaDB version 10" (i added mariadb=true
on the Homestead.yaml file).
I joined some snapshot, i think it will help.
Thanks
Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL : alter table
password_resetsadd index
password_resets_email_index(
email))
Using MariaDB 10.1
Client error: 'POST http://api.XXX.com.cn/oauth/token' resulted in a '429 Too Many Requests' response: Too Many Attempts.
Hello, when I send some requests a little fast, I would got the error above.
I have try do modify the throttle
config in routes/web.php
and routes/api.php
, but nothing changed.
THX!
C:\laragon\www\someline-starter>php artisan starter:entity Post
[ReflectionException]
Method Someline\Repository\Generators\Commands\EntityCommand::handle() does not exist
I am getting the following error:
[vue-i18n] Cannot translate the value of keypath "user.users". Use the value of keypath as default
I do not know how to generate them, thanks
php artisan db:seed
[ReflectionException]
Class Someline\Api\Auth\Provider\Passport does not exist
error message:
Failed to get access token for grant type [password]!
D:\Works\PHP\vmcmf\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:357
D:\Works\PHP\vmcmf\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:401
D:\Works\PHP\vmcmf\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:412
D:\Works\PHP\vmcmf\tests\Api\BaseApiTestCase.php:52
D:\Works\PHP\vmcmf\tests\Api\UserTest.php:14
Which should I use access token ?
is .env file's APP_KEY ? or API_TEST_CLIENT_SECRET ?
or OAuthTest.php client_secret ?
The following is my information:
.env
APP_KEY=base64:vJhhQ0/1054RxN84fm5nNDE3nsuN5QSva9aWrLwXcc8=
API_TEST_CLIENT_SECRET=4rZFdBwG698O7t6F84dKRmWglTdEx7hhin15uM2u
OAuthTest.php
'client_secret' => 'GHhWZFvak0iEJ5yh43hP8VVquuZJTp3fPgVIm6mF',
Hi,
Getting Error on php artisan migrate
command
only 3 tables are getting created migrations
, password_resets
, users
;
here is output file of php artisan migrate > artisan_migrate.txt
full path is removed in output
Steps i followed
system environment
Migration table created successfully.
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `password_resets` add index `password_resets_email_index`(`email`))
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:143
2 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:141
Please use the argument -v to see more details.
The UsersTableSeeder works well and also passes all the tests; however, when I created a new model "Post" according to the guide, it throws "[Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException] " while seeding.
I have also checked on Tinker, it was there for Post model but not for the User model.
Can you give me some pointers that how to resolve it?
安装一些其他扩展,默认使用 user 表 id 作为主键, 但这里用的是 user_id ,给操作带来一些不便
I've setup the new version of Someline (Laravel 5.3) and it point to http://someline-starter-demo.app but when i run unit test i get this error:
Connection timeout:
REST CLIENT SERVICE: local, ENVIRONMENT: dev
REST CLIENT BASE URI: http://someline-starter.app/
I'm looking the video tutorial (the new video version, that is related to Laravel 5.2) and this show how to modify the base_uri in BaseApiTestCas.php
But in this new version the structure has changed and i dont find how to change that URI.
Hi,
I'm trying to follow your YouTube tutorial.
I've got as far as running the command php artical jwt:generate
. However I'm getting the following error message:
There are no commands defined in the "jwt" namespace.
I haven't been able to find anything on google to help. Any ideas?
rt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.