Comments (28)
Change to us-east-1
for the region
from laravel-dynamodb.
Hello, thanks for reminding me to update the docs. Here are the steps:
- Configure your dynamodb credentials in
config/services.php
- Create your model class as usual
- Extend this class with
BaoPham\DynamoDb\DynamoDbModel
- Set your
$fillable
property - Use the Eloquent syntax as usual
from laravel-dynamodb.
hi, thanks for your reply
but I still have difficult to connect dynamodb
Do i correct below for the model class?
app/Product.php
app/Http/Controllers/ProductController.php
with('products', $products); } }such as I have a "products" table
- id
- name
but here have some errors
from laravel-dynamodb.
what are the errors?
from laravel-dynamodb.
FatalErrorException in Product.php line 8:
Class 'App\BaoPham\DynamoDb\DynamoDbModel' not found
from laravel-dynamodb.
You have the namespace wrong, put \
in front of BaoPham
class Product extends \BaoPham\DynamoDb\DynamoDbModel
If you use an IDE (PhpStorm), it'd help with error like this.
from laravel-dynamodb.
Thank you, it have good changing, but have the below error
DynamoDbException in WrappedHttpHandler.php line 192:
Error executing "Scan" on "https://dynamodb.us_east_1.amazonaws.com"; AWS HTTP error: cURL error 6: Could not resolve host: dynamodb.us_east_1.amazonaws.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
from laravel-dynamodb.
Please check your services.php
again and see if you have put all the correct info. Good way to check also is to use artisan tink
and call config('services.dynamodb')
from laravel-dynamodb.
services.php
'dynamodb' => [
'key' => env('DYNAMODB_KEY'),
'secret' => env('DYNAMODB_SECRET'),
'region' => env('DYNAMODB_REGION'),
'local_endpoint' => env('DYNAMODB_LOCAL_ENDPOINT'), // see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html
'local' => env('DYNAMODB_LOCAL'), // true or false? should use dynamodb_local or not?
],
and i added the code in .env
DYNAMODB_KEY=XXX...
DYNAMODB_SECRET=XXX...
DYNAMODB_REGION=US_EAST_1
and the checking result
is
=> [
"key" => "XXX...",
"secret" => "XXX...",
"region" => "US_EAST_1",
"local_endpoint" => null,
"local" => null,
]
from laravel-dynamodb.
error is the same
... "https://dynamodb.us-east-1.amazonaws.com" ...
only us_east_1 to us-east-1 changed
from laravel-dynamodb.
are you certain that it is the correct region?
from laravel-dynamodb.
yes, i am using "US East (N. Virginia)" which displayed in the top-right corner on aws console
and it works with the no framework php:
'region' => Aws\Common\Enum\Region::US_EAST_1,
from laravel-dynamodb.
Or is that is a feasible way to give me a template repository which just let me to fill in the KEY and SECRET and table name? Then i can connect with dynamodb and display the items on my table.
from laravel-dynamodb.
It seems more like a network issue actually.
Why don't you put up a quick repo of what you have so far and I can take a look.
from laravel-dynamodb.
It is a good idea!
https://drive.google.com/open?id=0B7a_eGs6V1ToaHFyX0VYMVRHU00
The project I use "products" as my testing
Thanks!
from laravel-dynamodb.
I will take a look in the weekend.
from laravel-dynamodb.
Thank you!
from laravel-dynamodb.
I created a table products
under region us-east-1
and it's working fine for me. Check your network if somehow it is blocked.
from laravel-dynamodb.
hi
I just added my key and secret in .env
then have a table called "products" like this
https://drive.google.com/file/d/0B7a_eGs6V1TobVdtMFZjNnl0XzQ/view?usp=sharing
with itemid and itemAddress attribute
However, when I go to http://localhost:8000/product
I still got the error of
"Error executing "Scan" on "https://dynamodb.us-east-1.amazonaws.com"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
from laravel-dynamodb.
That sounds more like a different problem. Google will help. For example, http://stackoverflow.com/questions/28858351/php-ssl-certificate-error-unable-to-get-local-issuer-certificate
By the way,
Is itemid
your primary key? if so, please set it in your Product
class:
protected $primaryKey = 'itemid';
by default your primary key is id
from laravel-dynamodb.
am i right?
https://drive.google.com/open?id=0B7a_eGs6V1ToUjhUZEdkZEdnTzg
and this in Product.php
from laravel-dynamodb.
Yes, but you should use string for primary key. Dynamodb does not support incrementing ID. You have to set the ID yourself. But this is a separate thing I wanted to point out. You should google for the error that you're getting
from laravel-dynamodb.
thanks!
why you are working fine but I cant for the same repo with same changes?
from laravel-dynamodb.
My local server has ssl cert setup correctly?
from laravel-dynamodb.
I finally got the item data but in an error page
but it is a great step for me
Thank you so much!
from laravel-dynamodb.
great
from laravel-dynamodb.
hi
I have a problem with upload photo with S3
In the ..blade.php
{!!Form::file('image')!!}
In the Controller
public function store(Request $request)
{
..........
$imageFileName = "123.png";
$s3 = \Storage::disk('s3');
$filePath = '/mybucket/' . $imageFileName;
$s3->put($filePath, file_get_contents($request->file('image')), 'public');
............
}
Why I have an error on
file_get_contents(): Filename cannot be empty
from laravel-dynamodb.
This has nothing to do with this library. Please use Stackoverflow for this.
from laravel-dynamodb.
Related Issues (20)
- Combination of wherIn() and update() not working HOT 2
- I can't sort the items on a query HOT 3
- Could you fix this code? (PHP5.6 FatalError Analyzer.php ) HOT 1
- Issue using Nested attributes HOT 1
- Could I use AssumeRole with baopham dynamodb? HOT 2
- Force KeyCondition when filtering by only partition key in a table with a composite key HOT 1
- Add DAX Client HOT 1
- Pagination HOT 3
- DynamoDbModel constructor is not calling the `initializeTraits()` method like the parent HOT 1
- Unable to update data using where() HOT 6
- dynamodb.php not recognized HOT 1
- How to use 'Sort descending'
- How to query List\Map Key-Value field HOT 2
- Invalid Query or Scan syntax with "single-table design" indexes HOT 1
- How can we use API resources?
- Expecting RequestInterface, given RulesetEndpoint HOT 6
- Cannot access property/attribute of returned record HOT 2
- get() with a non-existent value as the primary key using where returns a collection with null instead of an empty collection
- Laravel 11 support HOT 12
- problem in nested query HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-dynamodb.