Giter VIP home page Giter VIP logo

someline-starter's Issues

BaseModel error

# 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();
    }

Why PHPUnit error ?

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',

主键的问题

安装一些其他扩展,默认使用 user 表 id 作为主键, 但这里用的是 user_id ,给操作带来一些不便

problem with vuex

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

Why is `.idea` included?

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!

Error while running php artisan route:list

Hi,

i have this error while running the command php artisan route:list :

[ReflectionException]
Class Someline\Http\Controllers\HomeController does not exist

Solution :

  • Remove the line from Http/routes.php file
  • Add a HomeController to the project

Another issue : I dont see Api routes in the result of that command, why ?

Thanks

Unit Testing Someline V0.3.4 - Failed to get access token.

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... :)

db:seed error

php artisan db:seed

[ReflectionException]
Class Someline\Api\Auth\Provider\Passport does not exist

Issue when runing php artisan migrate

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 tableoauth_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.
capture d ecran 2016-07-20 a 15 30 56
capture d ecran 2016-07-20 a 15 31 04

Thanks

php artisan migrate

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)

How to change timezone?

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!

429 Too Many Requests

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!

Specified key was too long in initial migration

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

Migration error

Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL : alter tablepassword_resetsadd indexpassword_resets_email_index(email))

Using MariaDB 10.1

There are no commands defined in the "jwt" namespace.

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?

No CSS Displayed

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.

"AccessDeniedHttpException" while seeding new model

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?

Vue i18n cannot translate

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

Getting error while "php artisan migrate"

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

artisan_migrate.txt

Steps i followed

  • composer install
  • cp .env.example .env
  • chmod -R 777 storage bootstrap/cache
  • php artisan key:generate
  • php artisan migrate ( database already created and .env configured )

system environment

  • PHP: 7.1.18
  • MySQL: 5.7.22
  • SQLite installed
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.

How to change base_uri for Unit Test

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.

api/user/me

用里面的模板,api 请求都返回message":"Unauthenticated.","status_code":401,"debug": 是什么原因?

Generators

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..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.